Part Number: TMS320F28034
Hi Team,
There is an issue from the customer need your help:
F28034, driver IO control WS2812B chip. The crystal oscillator uses internal INTOSC1 to multiply to 50M, adding an asm ("NOP"); statement, about 300ns increase the time, in theory, is not the 50ns corresponding to the 20M clock?
The first high time in the picture executes two asm ("NOP"); , the second high time performed three asm ("NOP");. The GPAQSEL1 register is configured as asynchronous. I want to know asm("NOP"); Why is latency not clock cycles, or is there another more precise delay method.
It's strange that I cannot attach my picture in this post.
void WS2812B_tx(void)
{
Uint16 ws2812hl[24],rgb,i;
rgb = WS2812.GRB;
for(i=0;i<24;i++)
{
if((rgb & 0x00800000) == 0x800000)
ws2812hl[i] = 1;
else
ws2812hl[i] = 0;
rgb = rgb << 1;
}
if(ws2812hl[0])
{
ws2812b_H;
asm(" NOP");asm(" NOP");asm(" NOP");
ws2812b_L;
//asm(" NOP");
}
else
{
ws2812b_H;
asm(" NOP");asm(" NOP");
ws2812b_L;
//asm(" NOP");
}
if(ws2812hl[1])
{
ws2812b_H;
asm(" NOP");asm(" NOP");asm(" NOP");
ws2812b_L;
//asm(" NOP");
}
else
{
ws2812b_H;
asm(" NOP");asm(" NOP");
ws2812b_L;
//asm(" NOP");
}
Could you help check this case?
Thanks & Regards,
Ben