How verify and set the CPU working frequency on the TWRK65F180M evaluation board

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How verify and set the CPU working frequency on the TWRK65F180M evaluation board

1,174 次查看
matteocrulli92
Contributor I

Hi, 

I write some line code in a main function for cyclically send a buffer through UART1 (with a specific delay) to another board. Everything works fine, the only thing I don't like is the delay time between one buffer and the next.

The code (a little bit) is that:

while (1)
{
    UART_DRV_SendDataBlocking(UART1_IDX, buffer, byteCountBuff, 1000u);
    delay_ms(1000); 
}

void delay_ms(int times)
{
     int x;
     for (x=times; x>0; x--)
    {

     }
}

he delay I measure with the oscilloscope between the sent buffers is around 100us (not 1000ms as I expected). I think this is due to the working frequency of the CPU, which according to my calculations is around 10 MHz.

My question is: where can I see how it was set within the code  and how to modify it to get the expected delay passed to the dalay_ms function? I think it was i the hardware_init , but i don't now where is the correct point..

Thank you in advance!

 

0 项奖励
回复
0 回复数