Position2go CAN Bus Configuration

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
_Tom_
Level 2
Level 2
25 sign-ins 5 replies posted First solution authored

Hi,

Because position2go doesn't have the CAN Bus,so I made a CAN Bus output interface based on position2go.I try to use CAN_XMC47.zip code to add in position2go P2G_FM main.c .But It error CAN_NODE1_RXD_P1_13 But it occurred error as CAN_NODE1_RXD_P1_13. Should I have to configure the pins?What do I need to set in APP Dependency Tree ,APP Dependency and HW Signal Connectivity?

Is there anything to pay attention to in the construction of the CAN Bus or any such step-by-step document that I can refer to?

Thanks

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi, @_Tom_ ,

    Here is an example about Multi-can Config of XMC4700, the definition of "uint8_t can_data_ byte[8];uint16_t can_data_word[4]; uint32_t can_data[2];"  mentioned in 'xmc.can.h' and called in 'xmc_can.c'.

Owen_Su_0-1662605576038.png

    As my understanding, you can connect the XMC4700 with Arduino and use the CAN bus function, but we don't have the example to use CAN BUS in Arduino, you can follow other examples to try( XMC-for-Arduino)

    Hope this can help you.

    Regards,

    Owen_Su

 

View solution in original post

0 Likes
4 Replies
lock attach
Attachments are accessible only for community members.
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi, @_Tom_ ,

    When you specific the node to transmit data, you need to config the pin, the document in the example code can tell you how to set the app.

Owen_Su_0-1662101728828.png

    And the attachments below are about the development environment settings and software manual of P2G, you can follow the step to set up your environment. If this doesn't work, you can check another example codes: xmc+CAN  , which are based on ModusToolbox.  Please let us know if you have any other questions, hope this can help you.

Regards,

Owen_Su

0 Likes
_Tom_
Level 2
Level 2
25 sign-ins 5 replies posted First solution authored

Hi,@Owen_Su 

Is there a function to call "uint8_t can_data_byte[8];uint16_t can_data_word[4]; uint32_t can_data[2];" to send data?

Can XMC4700 demo CAN Bus like Arduino project?

canMsg.can_id = 0x036;
canMsg.can_dlc = 8;
canMsg.data[0] = 0x00;
canMsg.data[1] = 0x00;
canMsg.data[2] = 0x00;
canMsg.data[3] = 0x00;
canMsg.data[4] = 0x00;
canMsg.data[5] = 0x00;
canMsg.data[6] = 0x00;
canMsg.data[7] = 0x00;
mcp2515.sendMessage(&canMsg);

 Thanks

0 Likes
lock attach
Attachments are accessible only for community members.
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

Hi, @_Tom_ ,

    Here is an example about Multi-can Config of XMC4700, the definition of "uint8_t can_data_ byte[8];uint16_t can_data_word[4]; uint32_t can_data[2];"  mentioned in 'xmc.can.h' and called in 'xmc_can.c'.

Owen_Su_0-1662605576038.png

    As my understanding, you can connect the XMC4700 with Arduino and use the CAN bus function, but we don't have the example to use CAN BUS in Arduino, you can follow other examples to try( XMC-for-Arduino)

    Hope this can help you.

    Regards,

    Owen_Su

 

0 Likes
Owen_Su
Moderator
Moderator
Moderator
250 solutions authored 500 replies posted 50 likes received

If you have any other questions, please feel free to open a new thread, thanks for your understanding.

Regards,

Owen_Su

0 Likes