Replies: 1 comment
-
Hi @georgedlu |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a custom board based on H563vit6, using the variant STM32H5xx/H563V(G-I)T_H573VIT.
I need to sample data from ADCs using three SPI peripherals
SPIClass SPI3_STM32(PC12, PC11, PC10);
SPIClass SPI1_STM32(PD7, PB4, PB3);
SPIClass SPI4_STM32(PE6, PE5, PE2);
I am managing my own NSS pins
SPI3_NSS on PA15_ALT1
SPI1_NSS on PA4
SPI4_NSS on PE4
Only SPI4 is working as configured. With SPI1 and SPI3, the MCU hangs on SPI.transfer()
Using stm32Cube to configure the same SPI peripherals on these same pins, I was able to use simple HAL_SPI_Transmit() calls to verify that NSS, SCLK, MOSI are correctly working for SPI1 and SP3 (probed those lines with logic analyzer). So the issue seems to be with instantiating SPI1 and SPI3 in Arduino.
I am using platformio. The relevant variant files are in .platformio/packages/framework-arduinoststm32/variants/STM32H5xx/H563V(G-I)T_H573VIT.
In PeripheralPins.c I see the "WEAK const PinMap PinMap_SPI_*[]" lines. They seems to have the correct entries to match the SPI pins and their AF.
In variant_generic.h I have tried commenting out the PIN_SPI_* default defines, corrected PIN_SERIAL_RX, PIN_SERIAL_TX to match the UART4 on my board, and deleted many unused peripherals (DAC, I2C, etc.).
Could you please advise what I might be missing?
Beta Was this translation helpful? Give feedback.
All reactions