Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 217542

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

$
0
0
Part Number: TMS470R1B1M 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; }

Viewing all articles
Browse latest Browse all 217542

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>