SPI mode and bitrate cannot be changed in Arduino DUE
3 views (last 30 days)
Show older comments
Massoud Tohidian
on 6 Aug 2019
Commented: Massoud Tohidian
on 13 Aug 2019
I'm using MATLAB R2016a with Arduino DUE. When a SPI device object is created using spidev, it cannot correctly change SPI mode and bitrate. Mode is alway 0 and bitrate is always 4Mbps. I have tried this also with R2019a and it is the same.
For example, I try to use this command to change Mode to 3 and bitrate to 1Mbps:
spidev(a,'D10','Mode',3,'Bitrate',1000000);
But it does not change anything there.
Is there a bug there? How can it be fixed?
Thanks in advance.
1 Comment
Andrey Kiselnikov
on 6 Aug 2019
Before using the interfaces you should create the system object that will control the board. Can you attach your script here?
Accepted Answer
Andrey Kiselnikov
on 6 Aug 2019
Right now I have no Arduino Due, but I can check your script next week. If it will be actual, let me know please.
More Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!