How to set _nop() time

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set _nop() time

905 Views
ahhhhhhhhhhh
Contributor II

Hi Community,

I'm confused about the clock setting of RT1064. I want to use _nop() to have a delay, but I don't know how to calculate the delay time and what the clock the nop will use, and how to change the time of running one _nop() command?

I'm using the driver example program of GPT timer, and confused about the clock setting of this program.

Best Regards

Labels (1)
Tags (2)
0 Kudos
7 Replies

857 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, my name is Pavel, and I will be supporting your case, I suggest dot use the _nop() as delay, I recommend use a timer delay to get a better performance, in all the examples you can find the DOC file and documentation about the works of this.

Web: The simplest NOP statement in C is the null statement, which is just a semi-colon in a context requiring a statement.

Best regards,
Pavel

0 Kudos

850 Views
ahhhhhhhhhhh
Contributor II

Hi Pavel,

Thanks for your reply! I'm using a timer to get a interrupt for every 1s, and during the interrupt to have several nop for 100us, since I want to delay 100us for every 1s.  When I use timer and count the interrupt number, it has some problems. So if do not use nop, Is there any solution to generate such signal?

Best regards

Iris

0 Kudos

820 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, sorry but that was not clear, could you elaborate further about what you want to do?

I understand the next: The interrupt is coming every 1s, but you want to delay 100us after that?

Best regards,
Pavel

0 Kudos

810 Views
ahhhhhhhhhhh
Contributor II

I want to generate a pulse train of 100us pulse width and 1Hz frequency using timer. 

Best regards,

Iris

0 Kudos

782 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, I do not recommend using a timer, maybe the example of the PWM could help you, because the timer has a specific time, rather than the PWM you could be able to move the duty cycle on the same frequency.

Best regards,
Pavel

 

0 Kudos

712 Views
ahhhhhhhhhhh
Contributor II

Hello, actually I have already used the eFlexPWM to generate a pair of high frequency (250KHZ) complementary PWM, and I want to make this PWM signal as the burst output, it means that the complementary PWM signal will output for 100us and then output low level voltage for 1s. And I don't know how to use another low frequency PWM(1HZ with 100us positive pulse width) to trigger this pair of high frequency complementary PWM signal, so I use timer to make it enable and disable for every 100us and 1s.

Best regards,

Iris

0 Kudos

605 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

Could please create a new question in the community as the information is different from the original post on this thread?

Best regards,
Pavel

0 Kudos