Skip to content

SPI delay improvement #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kplus opened this issue Nov 9, 2020 · 2 comments
Open

SPI delay improvement #92

kplus opened this issue Nov 9, 2020 · 2 comments
Assignees
Labels
firmware Relating to the device firmware revision 2 Revision 2 hardware testing Relating to testing

Comments

@kplus
Copy link
Contributor

kplus commented Nov 9, 2020

No description provided.

@kplus kplus self-assigned this Nov 9, 2020
@kplus kplus added firmware Relating to the device firmware revision 2 Revision 2 hardware testing Relating to testing labels Nov 9, 2020
@kplus kplus changed the title SPI delay improvment SPI delay improvement Nov 9, 2020
@kplus
Copy link
Contributor Author

kplus commented Nov 10, 2020

It seems the SPI transmission(8 bits data) added about 3us delay, this can be get rid of by moving the actual transmission to another time, and only indicate the daughter board to switch to next LED using NSS pin as generic GPIO. However, the bl_set_led function call itself takes about 6us which is too long. We can try to directly set GPIO or write to BSRR to see if that will be much quicker.

@kplus
Copy link
Contributor Author

kplus commented Nov 11, 2020

By using NSS pin as GPIO indicator and directly write to GPIO registers, we minimised the delay, and now it's about 200-300ns which should be good enough. And we can see from the diagram that the LEDs on mother and daughter board lights almost at same time, the delay is within 1 sample period.

Screenshot from 2020-11-11 11-43-56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
firmware Relating to the device firmware revision 2 Revision 2 hardware testing Relating to testing
Projects
None yet
Development

No branches or pull requests

1 participant