In this connection I have a question:
How does UAVCAN work without CAN bus libraries on a board with STM32H7 chip? @PavelKirienko
Are there plans to implement CAN support on STM32H7 chips in NuttX and when? @nuttx
There is CAN-FD support coming on H7 with the next NuttX update, check these PRs:
Iām not sure if itās in NuttX 10.3 or 10.4 but some PRs are coming soon here.
That being said, I tried to get a CAN device (not UAVCAN) working on top of 10.4 but I could not see my device using candump in the console. Maybe Iām missing something, or maybe itās not that trivial to use a CAN device using CAN-FD although I thought it was backwards compatible.
Hi!
Thank you so much for your reply. I just saw that 5 hours ago the NuttX platform was upgraded to version 10.3+
I too am now trying to add a CAN 2.0A device, it is a microwave radio altimeter based on the Nanoradar NRA24. I hope I succeed and share this driver with everyone, maybe you can do it now too.
Thanks a lot to you and the dev team!
I am now immersed in studying the AUVCAN driver software code for the STM32H7. Since Pavel Kirienko answered that UAVCAN can share the same bus with other protocols based on CAN 2.0A (11-bit identifiers).
I am planning to either write a new function in the existing UAVCAN driver which will pass the standard CAN frames I need or use the existing ones, similar to what was already described, like this:
If it works, then we do not have to disable UAVCAN to receive messages from CAN 2A devices and receive and process them on the same wires as the UAVCAN devices
Hi Julian
I am planning on using the socketCAN driver for Pixhawk6C. I am running into NuttX compile errors using the defconfig defines you have above in the fmu-v6c defconfig file. It is because NET_SOCK_TYPE isnāt defined. It appears CONFIG_NET_IPv4 is somehow defined. That causes NET_SOCK_FAMILY to be AF_INET, and NET_SOCK_TYPE to not be defined in netconfig.h. Have you come across this before?
Hi Julian
Have you achieved reading and writing classic can messages busing stm32_fdcan_sock.c ? Can you please give a brief introduction about how to use this. I am confronting the problem of reading/writing can messages via v6x(which uses stm32h753)
Thanks for your reply!
Do you mean by conducting these settings, I can directly call the methods in cansend.c and candump.c in platforms\nuttx\NuttX\apps\canutils to receive/transmit messages? Are there any other settings need to be done such as modifing the original methods in cansend.c ?
You will have to adapt cansend and candump to what you actually need to do on CAN. Or rather you copy the parts of cansend and candump that you need. But for a first test, cansend/candump can help you debug whether it works.
Hi Julian, I did the configuarations as you described above, but when I type ācansend can0 1122334455667788ā or ācandump can0ā in the nsh console, nothing happens and i canāt receive or send any can messages through my USB-CAN device.
Are there any mistake in my working procedure? I just donāt know how to make it workā¦
It actually worked out as described by @JulianOes .
However it turns that i cannot change the configuration āCONFIG_FDCAN1_DATA_BITRATE=500000ā and āCONFIG_FDCAN2_DATA_BITRATE=500000ā ,I still have to use baudrate of 1000k to establish commonication.
Does anyone know how can I change the baudrate to 500k? Thanks in advance.
Hi,Julian. I found the following issue when using v6x CAN communication: when using standard frames, only some ID data can be received, and many IDs seem to be filtered. This issue does not occur when using extended frame packets. May I ask if there is a problem with my configuration?I configured it according to what you provided above.