How to assign to F28379D GPIO29 for SPI Master transfer block at external mode?
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I use MATLAB/Simulink interface with embedded support packages c2000 to generate code.
I use two Booster packs DRV8711 with Launchpad F28379D. In order to run both Booster packs DRV8711 in this configuration it is needed to use SPI communication (to set up the booster pack parameters) which has to be set for modul SPI_A and SPI_B. Modul SPI_B (headers J5 and J6) I am able to use without problems, but for the modul SPI_A (headers J1 and J2)I need to assign GPIO29 to control STE (slave select pin). And here is the problem:
I tested it in normal mode. It works. But in external mode, which I got used to to use, it does not work. And even when in model configuration parameters is GPIO29 nowhere else assigned.
How can solve this problem?
Thank you very much for your help
Michael
0 个评论
回答(1 个)
Sumith Sekharan
2018-4-24
Hi Michael,
You found a bug in the software which we will fix in the next support package update. External mode is assuming GPIO29 and 28 are used for serial communication even though we set different GPIOs for serial communication in SCI_A tab of configset.
As a workaround you can update registerSCIpinAssignmentExternalMode.m as below:
At line number 8, update GPIO pin to 43 instead of 28: GPIOPinUsed = 'GPIO43'; %SCI Rx pin on F2837xD Launchpad
At line number 11, update GPIO pin to 42 instead of 29: GPIOPinUsed = 'GPIO42'; % SCI Tx pin on F2837xD Launchpad
This file should be in the path SUPPORT_PACKAGE_ROOT\blocks\masks. For Example, C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\target\supportpackages\tic2000\blocks\masks\registerSCIpinAssignmentExternalMode.m.
Take a backup before updating this file and use this workaround at your own risk till we update the support package.
Hope this helps, let us know.
Thanks, Sumith
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Installation Setup and Configuration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!