The CANopen Slave is initialised with CosMgrInit(). This routine will setup the CAN controller and initialise all necessary services. Afterwards the stack can be started by calling the CosMgrStart() function.
In summary three steps are necessary to run the CANopen Slave:
The initialization functions of the CANopen Slave Protocol Stack have to be executed prior to any other API functions.
Starting in Classical CANopen mode
void MyCosInit(void)
{
}
@ eCP_BITRATE_500K
Definition canpie.h:677
@ eCP_BITRATE_NONE
Definition canpie.h:642
@ eCP_CHANNEL_1
Definition canpie.h:732
uint8_t CosMgrInit(uint8_t ubCanIfV, uint16_t uwConfigV)
Initialise the CANopen Slave.
#define COS_CONF_SLAVE
Definition cos_mgr.h:83
uint8_t CosMgrStart(uint8_t ubNodeIdV, int32_t slBitrateNomSelV, int32_t slBitrateDatSelV)
Starting in CANopen FD mode
void MyCosInit(void)
{
}
@ eCP_BITRATE_2M
Definition canpie.h:692
#define COS_CONF_FD
Definition cos_mgr.h:118