2019-10-08 06:52 AM
Hello everyone,
I want to contact STM32F103VC and STM32F407 with canbus protocol without transceiver.
I set baudrate 60kHz. but I can not send or receive data. Can you hel please ?
Thank you.
2019-10-08 07:23 AM
Should work at least for short distances.
Have you tried the devices separately, in loopback mode ?
2019-10-08 07:32 AM
Actually, stm32f407 is working another bord. but I havent tried stm32f103 yet. Distance is short.
2019-10-08 07:41 AM
Keil published a method using diodes to achieve a low-cost CAN connection.
http://www.keil.com/appnotes/docs/apnt_236.asp
http://www.keil.com/appnotes/files/apnt_236_v2.9.pdf
See "Tiny Network without Transceiver ICs"
2019-10-08 08:10 AM
in loopback mode stm32f103 is taking own value.
2019-10-08 10:21 PM
Yes, I know.
If you receive you own transmissions, cross-connecting the Tx/Rx lines to the other device would be the next step.
I hope you did not forget a GND connection, if the devices don't share a common GND on one power supply.
2019-10-08 10:49 PM
The devices sahare GND. but I use one wire for communication bus. so I have a wire for data and a wire GND
2019-10-08 10:50 PM
I did circuit. But I can not send data.
2019-10-08 11:09 PM
Does it gives some error or status indication?
A CAN transmitter needs a responding node. You'd need a receiving device with the matching baud rate to acknowledge the packet.
2019-10-08 11:14 PM
Actually, I wrote this code to send data. But this condition's resutl is CAN_TxStatus_Failed.
if(CAN_TransmitStatus(CAN1, 0) == CAN_TxStatus_Ok)
CAN_Transmit(CAN1, &CanTransmitMessage);