This is a little confusing so please bear with me.
I have an ST Micro STM32F746G Discovery reference board and I'm running it with ChibiOS 19.1.3. This board has a set of Arduino style headers on the back, and I recently added an mBED SX1262MB2CAS shield to it:
If you scroll down the page a little and look at the Pinout diagram, you can see that it has pin DIO1 connected to the ARD_D5 pin on the Arduino shield interface. This is the pin that the radio uses to signal interrupts.
I'm writing some driver code of my own for this radio, and so far I've been making OK progress, but I got a little stuck with the interrupt handling. I set up my code to try and use LINE_ARD_D5, but even though I was able to get the transmitter to send a packet, and see that the "TX done" interrupt bit was set in the IRQ register, my interrupt service routine was never triggering.
If you go to the following page, you can see the documentation for the STMF32F746G Discovery board:
https://www.st.com/en/evaluation-tools/ ... l#resource
Near the bottom in the SCHEMATICS section, there are two files available. One is for the MB1191 rev B02 board, while the other is for the MB1191 rev C01 board.
My board has a sticker on it that says: MB1191 B-04. (Actually I have two, they both say the same thing.)
Here's the confusing part:
If you look at the schematics for the Arduino connector in the rev B02 PDF, it shows that ARD_D5 is connected to GPIO port A pin 8 and ARD_D10 is connected to GPIO port I pin 0.
But in the rev C02 PDF, these pins are the other way around (ARD_D5 is GPIO port I pin 0, ARD_D10 is GPIO port A pin 8).
On my board (rev B04?) board, the ARD_D5 and ARD_D10 pins match the rev C02 schematic, not the rev B02 schematic.
Furthermore, there is a user's guide for the board, which is here:
https://www.st.com/resource/en/user_man ... ronics.pdf
On page 23 of this manual there is a table for the Arduino connector which also agrees with my board and the rev C02 schematics.
Meanwhile, the board.h file in the ChibiOS STM32F746G Discovery BSP says:
Code: Select all
#define LINE_ARD_D5 PAL_LINE(GPIOA, 8U)
#define LINE_ARD_D10 PAL_LINE(GPIOI, 0U)
Indeed, once I changed my driver code to use LINE_ARD_D10 instead of LINE_ARD_D5, my interrupt service routine started working as expected.
I don't know if this means that there actually was a rev B02 board where the pins were the other way around, or if the ARD_D5 and ARD_D10 definitions for these pins in the rev B02 schematic file were reversed by mistake. In any case, there does appear to be an unfortunate discrepancy between the current ChibiOS configuration and the currently available boards. (I bought mine just last year from Mouser Electronics.) I'm not sure what the right thing is to do about this, but I figured I should bring it to your attention. ChibiOS runs great on the board otherwise.