2015-02-02 04:35 AM
Help me, please.
I've got STM32F042K6T6. I generated project for IAR with STM32Cube. I need use CAN-BUS in my device but i can't, cause it doesn't work. I have CAN transmission in Infinite loop with 100ms delay. First 3 transmissions return timeout error ( /* Check End of transmission flag */ while(!(__HAL_CAN_TRANSMIT_STATUS(hcan, transmitmailbox)))). And then i haven't anymore mailboxes and HAL_CAN_Transmit returns HAL_CAN_STATE_ERROR. I have tested all CAN modes: CAN_MODE_NORMAL, CAN_MODE_LOOPBACK etc. I have got CAN driver SN65HVD233DR. I attach a main.c file to the message. And i see nothing on CAN_TX pin with oscilloscope - only 3.2 Volt. What i'm doing wrong? Help me please! Thanks! #can #hal #bxcan #stm32f0 #bus2015-02-03 12:01 AM
RESOLVED.
For test CAN you need at least two devices and this devices must be configured for similar baud rate. Without thoserequirements
, you'll see nothing good.2015-02-03 12:06 AM
Hallo
Are you able to receive the messages from the other device?2015-02-03 01:56 AM
Hi!
I can only transmit. I cannot receive messages. I'm trying to do it in this moment. I think it because of time quanta settings.2015-02-03 02:51 AM
2015-02-03 03:54 AM
But if the filter is not active, CAN should receive everything? And receive interrupt must be activated with every received packet? Am I right?
2015-02-03 04:10 AM
2015-02-03 04:18 AM
I
tried
polling mode and interrupt mod, but CanHandle->pRxMsg->Data[0-7] is always ''0''...2015-02-03 04:20 AM
Receive interrupt is never activated...
2015-02-03 04:35 AM