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


   ## Summary
   
   SPI Poll Send `bl602_spi_poll_send()` doesn't send any SPI Data because it 
doesn't enable SPI Master and it doesn't clear the SPI FIFO. Also it hangs 
because it loops forever waiting for the FIFO.
   
   We fix this problem by moving the code that enables SPI Master and clears 
the FIFO, from SPI Poll Exchange `bl602_spi_poll_exchange()` to SPI Poll Send. 
(Note that SPI Poll Exchange calls SPI Poll Send)
   
   [More Details Here](https://github.com/lupyuen/st7789-nuttx#fix-spi-send)
   
   ## Impact
   
   This problem affects all NuttX Drivers that call `SPI_SEND()` on BL602, 
including the ST7789 Display Driver.
   
   Previously `SPI_SEND()` didn't send any SPI Data and never returns, because 
it loops forever waiting to receive data.
   
   Now `SPI_SEND()` sends data and returns correctly.
   
   [More Details Here](https://github.com/lupyuen/st7789-nuttx#fix-spi-send)
   
   ## Testing
   
   We tested the modified SPI Poll Send with NuttX ST7789 Driver and a Logic 
Analyser on PineCone BL602:
   
   -  [Testing with Logic 
Analyser](https://github.com/lupyuen/st7789-nuttx#fix-spi-send)
   
   We also tested LVGL with ST7789 on PineCone BL602:
   
   -  [Testing with LVGL](https://github.com/lupyuen/st7789-nuttx#run-lvgl-demo)
   
   As for the modified SPI Poll Exchange, we tested with Semtech SX1262 SPI 
Transceiver on PineCone BL602:
   
   -  [Testing SPI Poll 
Exchange](https://github.com/lupyuen/incubator-nuttx/releases/tag/release-2022-03-28)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

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


Reply via email to