4 months ago.

NUCLEO-L496ZG & CAN bus

Hello World,

According to the pinout of the https://os.mbed.com/platforms/ST-Nucleo-L496ZG/

I set the CAN pin like:

CAN can1(PB_8, PB_9); CAN can2(PB_12, PB_13);

this line: can1.write(CANMessage(1337, &counter, 1)); seems to run ok.

But this: if (can2.read(msg)) { printf("Message received: %d\n", msg.data[0]); led2 = !led2; } make the board crash:

++ MbedOS Error Info ++ Error Status: 0x80FF013D Code: 317 Module: 255 Error Message: Fault exception Location: 0x8007B2B Error Value: 0x800687C Current Thread: main Id: 0x20001D94 Entry: 0x8007DDD StackSize: 0x1000 StackMem: 0x20000608 SP: 0x2004FF74 For more info, visit: https://mbed.com/s/error?error=0x80FF013D&osver=51200&core=0x410FC241&comp=1&ver=6110004&tgt=NUCLEO_L496ZG — MbedOS Error Info — system started()

Comment on this question
Be the first to answer this question.

You need to log in to post a question