2021-03-22 10:31 PM
i am making a J1939 data logger with STM32F405RGT. The vehicle's J1939 is transmitting data on 250kbps, but when i set250kbps in mcu it doesnot show any data on uart terminal , but when i set 500kbps in mcu then it shows some data on UART terminal.
I am using STM32CubeIDE and generated code using CubeMX. The Same firmware that has CAN configured at 250kbps receives data from a CAN Simulator.
2021-03-22 11:58 PM
Are you sure J1939 is compatible with CAN?
JW
2021-03-23 12:16 AM
It basically is - J1939 is based on CAN.
> ... but when i set250kbps in mcu it doesnot show any data on uart terminal ,
What is that supposed to mean ?
CAN and UART/RS232 are definitely not compatible.
2021-03-23 12:24 AM
I am using UART Only for debugging purpose....
I have configured CAN Receive Interrupt and in Interrupt Handler i am transmitting that data back to UART so that I can see it.
2021-03-23 02:14 AM
> The vehicle's J1939 is transmitting data on 250kbps, but when i set250kbps in mcu it doesnot show any data on uart terminal , but when i set 500kbps in mcu then it shows some data on UART terminal.
Any relation between CAN baudrate and UART baudrate seems contrived, and is only caused by your firmware.
Did you check the CAN lines with a scope ?
You should at least have a CAN adapter for your PC, in listen-only mode.
2021-03-23 03:30 AM
i have another board than has STM32F446RE ..same firmware work perfectly with the vehicle. getting proper RPM, coolant temperature , cruise control status at 250kbps
2021-03-23 07:48 AM
You don't try to run the very same firmware/binary on two substantially different MCUs, do you ?