How to assign to F28379D GPIO29 for SPI Master transfer block at external mode?
조회 수: 1(최근 30일)
표시 이전 댓글
Stan Milotinsky 2018년 4월 23일
댓글: Stan Milotinsky 2018년 5월 2일
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
댓글 수: 0
Sumith Sekharan 2018년 4월 24일
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.
댓글 수: 1
Find more on Texas Instruments C2000 Processors in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!