You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by "wes3 (via GitHub)" <gi...@apache.org> on 2023/06/14 13:54:53 UTC

[GitHub] [mynewt-core] wes3 opened a new pull request, #3017: hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers

wes3 opened a new pull request, #3017:
URL: https://github.com/apache/mynewt-core/pull/3017

   Changes allow for 16-bit DMA transfers for spi. Note that the current hal and other configuration code do not allow the spi to be configured for 16 bits. However, if this is configured outside the provided API this code will allow for the proper size transfer.
   
   I do think that we should add 16-bit spi transfers to the HAL (for all hal spi) but this is a larger undertaking and I think this change would be independent (and the same) without doing that which is why I am putting in this PR without adding 16-bit spi for HAL


-- 
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-unsubscribe@mynewt.apache.org

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


[GitHub] [mynewt-core] kasjer commented on pull request #3017: hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers

Posted by "kasjer (via GitHub)" <gi...@apache.org>.
kasjer commented on PR #3017:
URL: https://github.com/apache/mynewt-core/pull/3017#issuecomment-1594128722

   While code looks OK when only PR title is considered what will happen if transfer length is less then `MIN_DMA_SIZE`. Then even though SPI is configured for 16 bits, interrupt handler will operate on bytes transmitting extra bytes (I suppose) and dropping every other received byte.


-- 
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-unsubscribe@mynewt.apache.org

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


[GitHub] [mynewt-core] wes3 commented on pull request #3017: hw/bus/drivers/spi_da1469x: Allow for 16-bit SPI transfers

Posted by "wes3 (via GitHub)" <gi...@apache.org>.
wes3 commented on PR #3017:
URL: https://github.com/apache/mynewt-core/pull/3017#issuecomment-1597903532

   I did some testing; here are some stats. I do a very large DMA transfer (programming an fpga and it succeeds) and then some other short ones. The "read" command consists of two bytes written and three read.
   
   /* Send a read command */
   013588 read_bytes: 3
   013588 written_bytes: 104179
   013589 dma_transferred_bytes: 104169
   
   /* Send a read command */
   
   014982 Read data: 00:00:03
   compat> stat spi_da1469x_0
   
   015598 read_bytes: 6
   015598 written_bytes: 104181
   015599 dma_transferred_bytes: 104169


-- 
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-unsubscribe@mynewt.apache.org

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


[GitHub] [mynewt-core] wes3 commented on pull request #3017: hw/bus/drivers/spi_da1469x: Allow for 16-bit dma transfers

Posted by "wes3 (via GitHub)" <gi...@apache.org>.
wes3 commented on PR #3017:
URL: https://github.com/apache/mynewt-core/pull/3017#issuecomment-1594914529

   @kasjer That is a good point; I did not consider what would happen in the case DMA is not used. Let me review the code.


-- 
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-unsubscribe@mynewt.apache.org

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


[GitHub] [mynewt-core] wes3 merged pull request #3017: hw/bus/drivers/spi_da1469x: Allow for 16-bit SPI transfers

Posted by "wes3 (via GitHub)" <gi...@apache.org>.
wes3 merged PR #3017:
URL: https://github.com/apache/mynewt-core/pull/3017


-- 
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-unsubscribe@mynewt.apache.org

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