Is shared SPI working? #7558
Replies: 1 comment
-
Posted at 2023-05-11 by @fanoush Most probably you have some mix of your patched code, this part is not upstream at all, the only occurrence is here https://github.com/espruino/Espruino/blob/25648d5fc9c586e7a3271e944e5e3b3fb9bfd74b/targets/nrf5x/jshardware.c#L2458 and it allows to recover when some other code pulls CS high but that 'other code' is not there at all. This part is also not lcd_spi_unbuf specific, it is a minimal fix that allows sharing same spi with flash and anything else (like accelerometer on DK08) here https://gist.github.com/fanoush/627200137d8199c993d6c54901c1c819 is patch with @jeffmer 's changes of Posted at 2023-05-11 by yngv126399 Thank you sir. I thought I'd pulled from the latest, but clearly I did not. Thanks for the patch! Posted at 2023-05-12 by jeffmer Hi, Gordon rightly thought that switching between HW and SW SPI was a bit of a hack and that a more elegant solution would be to see if SPIFLASH code could use HW SPI when sharing SPI was necessary . I did not get round to looking at that and as @fanoush mentions, the HW/SW hack is not in the main Espruino repository. Posted at 2023-05-12 by yngv126399 Makes sense, and it does seem like I patched my branch and somehow forgot about it (getting more common these days)... Nice to hear from you @jeffmer! hope all's well... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2023-05-10 by yngv126399
I see a lot of @jeffmer 's code which allows sharing of SPI clock and data has made it into lcd_spi_unbuf. However, when I try to compile using SPIFLASH_SHARED_SPI, I get this error:
and when reading this message from jeffmer it looks like that function is not in targets/nrf5x/jshardware.c in the main branch. I'll try to add it from his repo, but curious if it is actually somewhere else? Has anyone used this feature in the main branch?
Beta Was this translation helpful? Give feedback.
All reactions