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.

TMS470R1B1M: can't config 6 PWM by using HET and can't read 24bit SPI data

Part Number: TMS470R1B1M
Other Parts Discussed in Thread: SM470R1B1M-HT

i have two confused questions about TMS470.

First, i can't config 6 PWM by using HET. The code is list below. And there are only two PWM out(pin1 and pin2). How can i config HET to let pin4 output at the same time.

L00: CNT  {next=L01, reg=A, irq=OFF, max=0x214A, data=0}

L01: ECMP {next=L02, reg=A, hr_lr=HIGH, en_pin_action=ON, pin=CC1, action=PULSELO, irq=Off, data=0x10A5}

L02: ECMP {next=L03, reg=A, hr_lr=HIGH, en_pin_action=ON, pin=CC2, action=PULSELO, irq=Off, data=0x18f6}

L03: ECMP {next=L00, reg=A, hr_lr=HIGH, en_pin_action=ON, pin=CC4, action=PULSELO, irq=Off, data=0x18f6}

Second, i can't read 24bit SPI data. When i use F28335, i send 8 bit data 3 times to read 24 bit SPI data. And there is nothing wrong.

When i use TMS470, i send 8 bit data 3 times by using the following codes. It can't go in to the RTI interruption normally. Are there something wrong with the code? And how can i rectify my code to send 3 times SPI data?

void RTI_38k4_timer(){
    // 3 times send, it can't go to the interruption normally
    SPI1DAT0 = 0x00f0;
    ad_read[0] = SPI1BUF;
    for(int i = 0; i < 3; i++);
    SPI1DAT0 = 0x00f0;
    ad_read[1] = SPI1BUF;
    for(int i = 0; i < 3; i++);
    SPI1DAT0 = 0x00f0;
    ad_read[2] = SPI1BUF;

    // 1 times send, it go to the interruption normally
    SPI1DAT0 = 0x00f0;
    ad_read[0] = SPI1BUF;
}

  • That part is not recommended for new designs.

  • i just know it. But i want to use a chip in high temperature(about 200℃) and the size of the chip should be less  than 30mm.

    So according to this requirement, i only find 1 chip meet the requirement. It is SM470. 

    Before i use SM470, i use F28335. But the HT chip of F28335 size is more than 30mm.

    So i want to solve this problem with TMS470.

  • The part you want is SM470R1B1M-HT. That part is supported by a different group. No problem, I will transfer this thread to that group.

  • That really helps me. THX

    i will wait for the solution.

  • Xiao,

    Unfortunately there is not significant expertise on this device remaining to answer all your questions.

    However, I will add what I can to help.

    1)  I am assuming you are using the HFQ/HKP reduced pinout package.   In this package not all of the HET pins are bonded out.  From the datasheet, there is HET0,2,3,4,5,6,8 available.  Your code includes HET pins that are not bonded out.  I am uncertain if this is related to your issue.

    I am not certain on the SPI.  I will dig a little deeper and see if I can point you in the right direction.

    Regards,

    Wade

  • Xiao,

    There is some example code for SPI located in the product folder.

    See:

    Under design and development tools.

    Within the doc the SPI can be set to 8 or 16 bit.  You may be able to extend this to 24 bit so the it is not doing 3 8 bit transactions.

    Also be aware that there are examples with the Software Peripheral Drivers (SPD).  This is located same place.

    If this answers your question, please click "This Resolved My Issue"
    Regards,
    Wade