You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/03/24 14:22:10 UTC

[GitHub] [incubator-nuttx] davids5 opened a new pull request #3167: stm32h7:SPI Fix 16 bit SPI mode

davids5 opened a new pull request #3167:
URL: https://github.com/apache/incubator-nuttx/pull/3167


   ## Summary
   
   The STM32H7  SPI driver was not using the HW correctly. Albeit the manual is super confusing, the bottom line is this.
   
   That a memory access  of 8, 16 and 32 bits, will write 1 byte, 2 bytes or 4 bytes to the FIFIO.
   
   With a frame size of 16 (CFG1_DSIZE == 0xf) a 32 bit write to SPI_TXDR will place 2 16 bit values into the FIFO.
   
   So the date sent on the wire was the correct first 16 bit  word followed by an incorrect 16 bit  word of 0x0000. This can be observed on master with an STM32H7 in the first image.
   
   I believe the STM32F7  (and all SoC's sharing the same IP) have the same issues but that is TBD. 
   
   ## Impact
   
   Master on STM32H7 note the 32 clocks on a 16 bit transfer.
   ![image](https://user-images.githubusercontent.com/1945821/112324030-9260ad80-8c6f-11eb-833f-bbf6f140b03a.png)
   
   After on STM32H7 as expected 16 bits and 16 clock edges. 
   ![image](https://user-images.githubusercontent.com/1945821/112323644-385fe800-8c6f-11eb-8836-2795834053be.png)
   
   
   ## Testing
   
   PX4 cuav_x7pro with ADIS16470 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis commented on pull request #3167: stm32h7:SPI Fix 16 bit SPI mode

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #3167:
URL: https://github.com/apache/incubator-nuttx/pull/3167#issuecomment-806052302


   Everything fine!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] hartmannathan commented on pull request #3167: stm32h7:SPI Fix 16 bit SPI mode

Posted by GitBox <gi...@apache.org>.
hartmannathan commented on pull request #3167:
URL: https://github.com/apache/incubator-nuttx/pull/3167#issuecomment-805998013


   Yes, the size of the access to the RxDR and TxDR is significant because of the SPI peripheral's Data Packing feature.
   
   The changes LGTM, though I don't have a setup to perform a hardware test today, so I'll defer to the other reviewers.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis merged pull request #3167: stm32h7:SPI Fix 16 bit SPI mode

Posted by GitBox <gi...@apache.org>.
acassis merged pull request #3167:
URL: https://github.com/apache/incubator-nuttx/pull/3167


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org