How to change RaspberryPi I2C speed in Simulink generated code?
显示 更早的评论
when generating code from Simulink for RaspberryPi 3, the generated code always sets the I2c speed to 100 kHz. The generated code looks like this:
localDW->obj_gt.BusSpeed = 100000U;
i2cname = 1;
MW_I2C_SetBusSpeed(i2cname, localDW->obj_gt.BusSpeed);
Is there any way for Simulink to automatically generate I2C speed different from '100000U'?
2 个评论
Madhu Govindarajan
2017-10-31
Could you set it up from Hardware Implementation pane > Target Hardware Resources > SPI > SPI0 CE0 Bus Speed (kHz)?
Ricardo Borges
2017-10-31
编辑:Ricardo Borges
2017-10-31
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Embedded Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!