How to assign to F28379D GPIO29 for SPI Master transfer block at external mode?

2 views (last 30 days)
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

Answers (1)

Sumith Sekharan
Sumith Sekharan on 24 Apr 2018
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
  1 Comment
Stan Milotinsky
Stan Milotinsky on 2 May 2018
Hi Sumith,
Thank you for the hack. I have tried your suggestion but unfortunately it did not work out. The GPIO29 is always set for SCI communication in External mode.
In the end because of time I did hardware hack. I rerouted the chip select from GPIO122 above. Unfortunately to do so I had to also bent pin 11 where GPIO29 is routed. See the picture.
I am looking for the update release.
Thank you
Michael

Sign in to comment.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!