STM32L471RGT6 32 bit SPI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-06 1:44 PM
Hi is it possible to communicate 32 bit data over the SPI bus? Using IOC to set up the SPI port 2 , I seem to be limited to 16 bits.
Thanks a lot
Richard
- Labels:
-
STM32L4 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-06 1:56 PM
As a pair of 16-bit words, or as 4-bytes, in a consecutive fashion, and arranged to suit whatever MSB-LSB and endian form you need.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-06 1:58 PM - edited ‎2023-11-06 2:00 PM
Of course. Send 16-bits, twice. Newer STM32s can send 32 bits in one write to the SPI data register, but L4 is limited to 16 bits at once.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-07 9:29 AM
Thank you Pavel, I was going to use NSS but I was thinking that that won't work as comms will shutdown after the first 16 bytes. I guess I will just have to manually control NSS.
Cheers
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-07 10:04 AM
You pretty much always have to manually control NSS, as it's gated by the SPI Enable, not by individual words or byte transacted via the data register. Most just use a GPIO as it's less trouble.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-11-07 10:19 AM
Thanks for the information!
