Manually enabling a FlexIO timer, but disabling on trigger

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Manually enabling a FlexIO timer, but disabling on trigger

977件の閲覧回数
powerfeatherdev
Contributor I

Suppose I have an external trigger signal A, and I want to create a signal B in response to that signal as follows:

 

Busdancer.jpeg.png

At each point:

  1. Signal A goes low. I want to detect this and do some setup.
  2. After the desired setup, I want to manually set signal B low (through some currently unknown means).
  3. Signal A goes high, and at the same time B should go high with as little latency as possible.

 

The approach that I tried at the moment is as follows:

  1. Signal A is put on one of the trigger pins on the RT1010, specifically on GPIO_AD_07. 
  2. Initial configuration:
  • GPIO_AD_07 iomux is set as an input GPIO. Interrupt for falling edge is enabled and handler is implemented.
  • A FlexIO timer is set to enable with FLEXIO1_TRIGGER_IN0 (XBAR1_OUT00) as trigger. This timer is set up to control signal B, mirroring the trigger signal.
  • XBAR1_IN01 (LOGIC_HIGH) is selected for XBAR1_OUT00.

In the event that signal A goes low:

  • Interrupt handler for GPIO_AD_07 triggers.
  • In the interrupt handler, GPIO_AD_07 iomux is set to XBAR1_INOUT3. The GPR6 register is configured to select XBAR1_IN03.
  • XBAR1_IN01 (LOGIC_HIGH) is replaced with XBAR1_IN03 for XBAR1_OUT00.

However, this does not work. Signal B remains high even as signal A changes. I’ve verified that if the following are set from the very beginning:

  1. GPIO_AD_07 iomux set to XBAR1_IN03.
  2. FLEXIO1_TRIGGER_IN0 (XBAR1_OUT00) set to XBAR1_IN03.

Signal B, which is controlled with said timer, mirrors Signal A with around 0.5-1.5 cycle latency due to pin synchronization as mentioned in the reference manual’s FlexIO chapter. So at least I know my timer config is correct.

Why is this approach not working? Are there other approaches you can recommend?

ラベル(1)
0 件の賞賛
返信
1 返信

962件の閲覧回数
Habib_MS
NXP Employee
NXP Employee

Hello @powerfeatherdev ,
In order to see if the xbar is correctly configurated, could you confirm if the xbar interrupt has been trigger? You can put a flag or a breakpoint inside the IRQ.
Also, in the chapter 4.5 called "XBAR Resource Assignments" you can see the xbar assignment to each peripheral. Please confirm that the xbar is correctly configurated.
Our i.MX RT1010 SDK sadly does not contain any example for this module, but the RT1020 SDK does. I would highly recommend you to refer to this this example in order to know how configure it.
BR
Habib

0 件の賞賛
返信