This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SCI 28069M Motorware

Other Parts Discussed in Thread: MOTORWARE

Hi,

I have followed the examples presented here and tried to implement SCI onto the DRV8301-HC-EVM with the 69M module. I just can't jump start this. I have implemented the code from here: e2e.ti.com/.../1168654

But there are a few problems. Firstly, I cannot build the lines noted in hal.c, using lab 7, like below;

void HAL_setupGpios(HAL_Handle handle) {
    
...

// Setup your GPIOs for SCI
    GPIO_setPullUp(obj->gpioHandle, GPIO_Number_28, GPIO_PullUp_Enable); //Can't compile this line!
    GPIO_setPullUp(obj->gpioHandle, GPIO_Number_29, GPIO_PullUp_Enable); //Can't compile this line!

    GPIO_setQualification(obj->gpioHandle, GPIO_Number_28, GPIO_Qual_ASync);

    GPIO_setMode(obj->gpioHandle, GPIO_Number_28, GPIO_28_Mode_SCIRXDA);
    GPIO_setMode(obj->gpioHandle, GPIO_Number_29, GPIO_29_Mode_SCITXDA);
...

}

I solved this by commenting out the lines about PullUps. Also, I wanted to change the IN/OUTPUTS to other pins. This is simply not possible in the same rows above. If I change "GPIO_Number_28, GPIO_28_Mode_SCIRXDA" into any other IO, like "GPIO_Number_16, GPIO_16_Mode_SCIRXDA", it can't compile. No matter what I throw in. Anyone have any idea why this is?

No matter of the above, I get the code compiled with IO 28 and 29, but then the output on these pins found on J12 is very strange. I can see the data received from the PC on my oscilloscope on the input pin. But the output throws very strange data out. It is just going low, staying low for a while, until end of data, where it goes high again. Nothing ever comes out. Also the RX never react on any inputs, even that I can clearly see them on the j12 pin. Anyone have any experience of similar issues?

I shall state that I'm a complete beginner with Ti and CCS. The MotorWare structure is still a bit confusing to me.

Thank you for any help.

Br,
Mikael

  • I solved this by commenting out the lines about PullUps. Also, I wanted to change the IN/OUTPUTS to other pins. This is simply not possible in the same rows above. If I change "GPIO_Number_28, GPIO_28_Mode_SCIRXDA" into any other IO, like "GPIO_Number_16, GPIO_16_Mode_SCIRXDA", it can't compile. No matter what I throw in. Anyone have any idea why this is? No matter of the above, I get the code compiled with IO 28 and 29, but then the output on these pins found on J12 is very strange. I can see the data received from the PC on my oscilloscope on the input pin. But the output throws very strange data out. It is just going low, staying low for a while, until end of data, where it goes high again. Nothing ever comes out. Also the RX never react on any inputs, even that I can clearly see them on the j12 pin. Anyone have any experience of similar issues?I shall state that I'm a complete beginner with Ti and CCS. The MotorWare structure is still a bit confusing to me.Thank you for any help. Br,Mikael
  • As an answer to this, for anyone in the same setup. You have to adapt the serial according to your clock frequency. The baudrates are calculated with 60MHz system clock. It is supposed to be 90MHz. So do a simple 1.5*the values for baudrates found in sci.h. Also note that you have to enable fifo on tx to get this working allright. Just do a #define SCI_FIFO in hal.h. All shall work fine now, on the 28-29 port. About enabling the serial on other ports, only GPIO7 and 12 are available. My serial communication is now working fine.
  • Mikael,

    Thanks for the update. It's good to see that you figured it out.

    -Ozino
  • Did you try switching from GPIO_setPullUp to GPIO_setPullup? The uppercase "u" was giving me problems as well.

    My serial communication still isn't working though so glad to see yours is!