8000 stm32: Support 'FDCAN' in board pin CSVs. by projectgus · Pull Request #16543 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@projectgus
Copy link
Contributor

Summary

This PR has been split out from #15989.

Previously micros with the 'FDCAN' peripheral (as opposed to the older 'CAN' peripheral) needed to rename these pins in the CSVs for the CAN driver to work.

The following CSVs in MicroPython still had FDCAN in them:

❯ rg -t csv -l FDCAN boards
boards/stm32h7b3_af.csv
boards/stm32h743_af.csv
boards/stm32h573_af.csv
boards/stm32h723_af.csv
boards/stm32g0b1_af.csv

Confirmed that this allows CAN to work on NUCLEO_H723ZG board, and that at least one board based on each of the other chips can still compile. Some of these boards could possibly have MICROPY_HW_ENABLE_CAN set and work, now.

Testing

Trade-offs and Alternatives

  • Could manually rename FDCAN in the mentioned CSV files, but given it's been missed in the past it seems safer for future SoCs if we apply the fix during processing.

@github-actions
Copy link
github-actions bot commented Jan 8, 2025

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

Previously micros with the 'FDCAN' peripheral (as opposed to the older
'CAN' peripheral) needed to rename these pins in the CSVs for the CAN
driver to work.

The following CSVs in MicroPython still had FDCAN in them:

    $ rg -t csv -l FDCAN boards
    boards/stm32h7b3_af.csv
    boards/stm32h743_af.csv
    boards/stm32h573_af.csv
    boards/stm32h723_af.csv
    boards/stm32g0b1_af.csv

Confirmed that this allows CAN to work on NUCLEO_H723ZG board, and that at
least one board based on each of the other chips can still compile. Some of
these boards could possibly have MICROPY_HW_ENABLE_CAN set and work, now.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
@dpgeorge dpgeorge force-pushed the bugfix/stm32_fdcan_pins branch from e129224 to 8e2da5a Compare January 17, 2025 01:02
@dpgeorge dpgeorge merged commit 8e2da5a into micropython:master Jan 17, 2025
10 checks passed
@projectgus projectgus deleted the bugfix/stm32_fdcan_pins branch January 17, 2025 06:25
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.

2 participants

0