I am using a the nucleo32 https://www.st.com/en/evaluation-tools/ ... umentation with a stm32F303K8 for my project.
I am using arduino and creating a TCP modbus and RTU modbus server.
I have set the pins as folows:
| Description | Type | Arduino | STM32 | Pin Number |
|--------------------|-----------|---------|-------|------------|
| Pulse input 1 | INTERRUPT | A0 | PA0 | 6 |
| Pulse input 2 | INTERRUPT | A1 | PA1 | 7 |
| Pulse input 3 | INTERRUPT | A7 | PA2 | 8 |
| Pulse input 4 | INTERRUPT | A2 | PA3 | 9 |
| Pulse input 5 | INTERRUPT | A3 | PA4 | 10 |
| Pulse input 6 | INTERRUPT | A4 | PA5 | 11 |
| Pulse input 7 | INTERRUPT | A5 | PA6 | 12 |
| Pulse input 8 | INTERRUPT | A6 | PA7 | 13 |
| MAX31865 DI | MOSI | D6 | PB1 | 14 |
| MAX31865 DO | MISO | D3 | PB0 | 15 |
| MAX31865 CLK | CLK | D9 | PA8 | 18 |
| MAX31865 CS 1 | OUTPUT | D10 | PA11 | 21 |
| MAX31865 CS 2 | OUTPUT | D2 | PA12 | 22 |
| MAX31865 CS 3 | OUTPUT | D5 | PB6 | 29 |
| MAX31865 CS 4 | OUTPUT | D4 | PB7 | 30 |
| MODBUS RTU TX | TX | D1 | PA9 | 19 |
| MODBUS RTU RX | RX | D0 | PA10 | 20 |
| DEBUG Serial TX | TX | -- | PA14 | 24 |
| Ethernet W5500 CS | OUTPUT | -- | PA15 | 21 |
| Ethernet W5500 SDI | MOSI | D11 | PB5 | 28 |
| Ethernet W5500 SDO | MISO | D12 | PB4 | 27 |
| Ethernet W5500 SCK | CLK | D13 | PB3 | 26 |
| Ethernet W5500 RST | NRST | -- | NRST | 4 |
| SWDIO | SWDIO | -- | PA13 | 23 |
| SWCLK | SWCLK | -- | PA14 | 24 |
I have set the Serial as folows:
Serial.setTx(PA14);
Serial.setRx(PNUM_NOT_DEFINED);
Serial.begin(115200);
Normally PA2 is set as the UART2 TX pin i have removed the SB4 bridge on the NUCLEO32 board.
which diconnects it from the VCP_TX pin.
And the setting the interrupts:
pinMode(interruptPin1, INPUT_PULLUP);
pinMode(interruptPin2, INPUT_PULLUP);
pinMode(interruptPin3, INPUT_PULLUP);
pinMode(interruptPin4, INPUT_PULLUP);
pinMode(interruptPin5, INPUT_PULLUP);
pinMode(interruptPin6, INPUT_PULLUP);
pinMode(interruptPin7, INPUT_PULLUP);
pinMode(interruptPin8, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(interruptPin1), interrupt1Callback, FALLING);
attachInterrupt(digitalPinToInterrupt(interruptPin2), interrupt2Callback, FALLING);
attachInterrupt(digitalPinToInterrupt(interruptPin3), interrupt3Callback, FALLING);
attachInterrupt(digitalPinToInterrupt(interruptPin4), interrupt4Callback, FALLING);
attachInterrupt(digitalPinToInterrupt(interruptPin5), interrupt5Callback, FALLING);
attachInterrupt(digitalPinToInterrupt(interruptPin6), interrupt6Callback, FALLING);
attachInterrupt(digitalPinToInterrupt(interruptPin7), interrupt7Callback, FALLING);
attachInterrupt(digitalPinToInterrupt(interruptPin8), interrupt8Callback, FALLING);
Now 7 of the 8 inputs work as expected except PA2 (A7). Whenever this pin is triggered the program stops working.
I would like to know why this pin is causing a crash?
Nucleo32 with STM32F303K8 crashes when triggering the interrupt of the PA2 pin
All about boards manufactured by ST
-
- Posts: 1
- Joined: Tue Apr 25, 2023 7:41 am
Return to “STM boards (Discovery, Eval, Nucleo, ...)”
Jump to
- Announcements
- New users start here
- ↳ Forum rules, FAQs and HowTo's
- ↳ Let us know a bit about you and your projects
- Arduino for STM32
- ↳ General discussion
- ↳ Ideas & suggestions
- ↳ Cores
- ↳ STM32 Core
- ↳ Builds and Announcements
- ↳ Code snippets
- ↳ Ideas & suggestions
- ↳ General discussion
- ↳ Installation and OS related
- ↳ Libraries & Hardware
- ↳ PR's bugs and enhancements
- ↳ LibMaple
- ↳ Builds and Announcements
- ↳ Code snippets
- ↳ General discussion
- ↳ Ideas & suggestions
- ↳ Installation and OS related
- ↳ Libraries & Hardware
- ↳ PR's bugs and enhancements
- ↳ Steve's LibMaple core
- ↳ General discussion
- ↳ PR's bugs and enhancements
- ↳ Projects
- ↳ IDE's
- ↳ Off topic
- Arduino for STM8
- ↳ General discussion
- ↳ Cores
- ↳ STM8 Core
- ↳ Other
- Boards
- ↳ Custom design boards
- ↳ Maple & Maple mini etc
- ↳ STM boards (Discovery, Eval, Nucleo, ...)
- ↳ All other boards
- ↳ STM32F0 based boards
- ↳ STM32F1 based boards
- ↳ STM32F2 based boards
- ↳ STM32F3 based boards
- ↳ STM32F4 based boards
- ↳ STM32F7 based boards
- ↳ STM32G0 based boards
- ↳ STM32G4 based boards
- ↳ STM32H7 based boards
- ↳ STM32L0 based boards
- ↳ STM32L1 based boards
- ↳ STM32L4 based boards
- ↳ STM32L5 based boards
- ↳ STM32MP1 based boards
- ↳ STM32WB based boards
- Bootloaders
- ↳ STM32 HID bootloader
- ↳ USB bootloader
- ↳ STM32 SD-Bootloader
- ↳ STM32 USB CDC bootloader
- Uploaders and debuggers
- ↳ STLink
- ↳ USB to Serial adaptors
- ↳ Black Magic Probe & other
- Dead Thread Graveyard
- ↳ Dead Thread Graveyard