Skip to content

Conversation

@JeremyBCD
Copy link
Contributor

Working on bringing up FDCAN on the STM32H7. Putting this up as a draft PR to get feedback and guidance.

Based on @Nukersson's comment here I set off to reconcile the register set on the STM32H7 versus STM32G4. Only other adjustment so far is in the clock config, as the STM32H7 requires different for FDCAN.

At this point, initialization completes w/o error, but sends aren't working—they timeout.

I have been testing with the CAN shell and /samples/drivers/can on STM32H753.

Would greatly appreciate guidance on getting this up and running!

JeremyBCD added 3 commits May 27, 2021 18:07
* Add can, can1 to stm32h7.dtsi.

Signed-off-by: Jeremy Wood <[email protected]>
* Add can1 config to nucleo_h743/753.

Signed-off-by: Jeremy Wood <[email protected]>
* Add STM32h7 fields to can_mcan_reg.
* STM32H FDCAN clock config changes.

Signed-off-by: Jeremy Wood <[email protected]>
@JeremyBCD
Copy link
Contributor Author

More detail on where I'm stuck: I'm testing with /samples/drivers/can. When I run it on a NUCLEO-F429 with CONFIG_LOOPBACK_MODE=y, I see my messages looping back. When I try to run the same thing on the NUCLEO-H743, I can see that can_mcan_send() is stuck waiting here:

LOG_DBG("Waiting for TX complete");
.

…n.c and can_mcan_int.h, added lots of debug logging.

Also modified /samples/drivers/can to turn on logging, etc. Loopback mode doesn't work. When loopback is OFF, I see some activity on CAN H/L, looks like the first CAN frame is being auto-retransmitted constantly. Tried connecting two boards, that doesn't work either.
@github-actions github-actions bot added the area: Samples Samples label Jun 4, 2021
@github-actions
Copy link

github-actions bot commented Aug 4, 2021

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Aug 4, 2021
@github-actions github-actions bot closed this Aug 19, 2021
@JeremyBCD JeremyBCD deleted the stm32h7-fdcan branch December 28, 2021 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant