cancel
Showing results for 
Search instead for 
Did you mean: 

Can STM32L4S9AII6 MCU SPI1 be configured as slave and accept 8-60MHz clock from master?

MFolk.1
Senior

Can the STM32L4S9AII6 MCU SPI1 be configured as slave and accept a 8-60MHz clock from master? Section 52.2 (page 1852) of the STM32L4S9AII6 reference manual says "Slave mode frequency up to fPCLK/2.", but with the system clock configured in MxCube as 120MHz (max freq) I go to the SPI1 config tab and it has a "Baud Rate" label that is displayed as 8000000. Not sure how baud rate is being calculated and I don't really care. I just want confirmation that I should be able to accept a clock from a master device at up to fPCLK/2 = 120MHz/2 = 60MHz. I have performed months of testing with one master that is clocked around 1MHz. Now I'm having issues as I switch to another master that is clocked at 12.5MHz. I have future plans to make this as fast as possible, so realistically what is my maximum clock frequency that I can accept from a master?

I should also note that this other master has a different chip select polarity (not sure about phase), but I have tried changing configuration settings for all 4 possible combinations of polarity and phase.

I have tried inserting breakpoints and asserting test point GPIO pins and I'm not seeing any sign of life within the RX half complete or RX full complete callback functions.

Is it obvious to anyone what I'm missing? Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
MFolk.1
Senior

Changing the NSS polarity isn't an option on this device apparently. I'll have to figure out how to invert the signal before it hits the MCU. Thanks for the help!

View solution in original post

3 REPLIES 3
MFolk.1
Senior

!!!!! UPDATE !!!!!

So the CPOL & CPHA on both master SPI devices that I'm working with are the same (1 & 1), but for some reason the new master device has an ACTIVE HIGH chip select, whereas I am used to the standard active low default.

So now my question becomes:

How do I update my MxCube settings to accept an Active High chip select?

AScha.3
Chief II

just set nss pol. hi ->

0693W00000WKeljQAD.pngor, if you cannot nns hardware pol. , put just a simple inverting gate in the line to cpu nss and is "low" select again.

If you feel a post has answered your question, please click "Accept as Solution".
MFolk.1
Senior

Changing the NSS polarity isn't an option on this device apparently. I'll have to figure out how to invert the signal before it hits the MCU. Thanks for the help!