The ControlSuite has an example of echo-back program using M3 UART, so someone typing on HyperTerminal would see echo. This works just fine, the blue LEDs are flashing with transmissions.
The ControlSuite also has an example of internal loop-back program using C28 SCIA, which is also working.
I am trying to create echo-back program using C28 SCIA. The program compiles but I do not see any activity on the serial -to-USB port (no blue LEDs).
Probably I need to initialize I/O pins correctly
Does anyone have a working example of echo-back program using C28 SCIA, similar to echo-back program using M3 UART?
We do not supply an example like this, but it would not be hard to take one of the existing SCI examples and turn it into an echo back example. You are absolutely right that you will need to modify the GPIO configuration. The M3 and C28 UART/SCI are available on the same pins (GPIO28 and 29), so you'll need to first give control of GPIO28 and 29 to the C28 core and then you will need to configure the GPIO Mux registers so that these pins are associated with the SCI signals. All of this is described in the technical reference manual.
Thanks for info, I just hoped someone already has done this configuration and I can re-use port setup. With limited numbers of Concerto pins and multiple pin functions it is not so easy.
I am actually transferring code written for F28335 into Concerto. This code has control part and user interface via serial port part. At the beginning, I want this code to work on C28 core only, than change user interface to M3 using the same CPIO28,29 pins, and let C28 core to do control only. That's why I need to setup SCIA port
I did start with comparison of C28 internal loop-back with echo-back code for 28335 and modifying internal loop-back. I did choose GPIO Mux registers with the help of PinMux utility, GPAMUX2=0x05000000. I assume that because I started from C28 internal loop-back code, M3 core actually already gives control to C28.
How can I verify or force processor to "give control to C28 core of GPIO28, GPIO29 pins"?
Take a look at the setup_m3 project in the control examples folder. This sets up all the GPIOs to be controlled by the C28. Try running this example on the M3 before you run your C28 code. If you have the C28 GPIO mux setup correctly you should be able to see pins toggle from the C28 core.
I finally have this example working.
I had difficulties with setup of GPAMUX2 - in the manual was not mentioned that this register is EALLOW protected.
I attach project for reference if someone needs it, which should go into "C:\TI\controlSUITE\device_support\f28m35x\v120\F28M35x_examples_Control\scia_echoback"
Some additional note to this project:
For some reason (SYSCLKOUT settings is NOT 150MHz, or CLOSPCP description is wrong, or SCIHBAUD, SCILBAUD description is wrong) BAUD is set 1/2x lower than in description, page 1140 in spruh22b "Technical Reference manual".
NOTE: For M3 core was used standard setup_m3 project. It set c28 clock to 150MHz, and default divider /4 in CLOSPCP is used to get LSPCLK = 37.5MHz.
This formula: "BRR = LSPCLK / (SCI Asynchronous Baud * 8) -1" (page 1140 i)
for 115200 buad rate gives BRR value of 0x27
When 0x27 value has been tried, SCI actually had 57600 baud rate.
So, program example has setting SCILBAUD = 0x13
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.