Hello,
I'll address the difference between IOMUX timer accessible via GPIO pins versus timer input via XBAR on the RT1020-series chip.
The difference between TMR1_TIMER0 via GPIO_SD_B0_00 and TMR1_TIMER0 at GPIO_AD_B1_09 via XBAR involves two different routing methods for timer signals:
1. Direct Timer Connection (IOMUX):
When using TMR1_TIMER0 via GPIO_SD_B0_00, you're accessing the timer directly through the IOMUX (Input/Output Multiplexer). This represents the default/direct path where the timer functionality is hardwired to specific GPIO pins. You simply configure the pin mux setting to select the timer function (typically ALT mode 1, 2, etc.).
2. XBAR Routing Method:
When using TMR1_TIMER0 at GPIO_AD_B1_09 via XBAR, you're utilizing the Cross Bar (XBAR) peripheral to route the timer signal to a different pin. This provides flexibility when the default timer pins are occupied by other critical functions (like SEMC, ENET, or SD card interfaces).
You would choose XBAR routing when:
- The default timer pins are already used by other essential peripherals
- You need to route multiple signals to a single peripheral
- You need to connect a pin to both GPIO functionality and timer input simultaneously
- You need flexible input/output signal routing without hardware modifications
The direct IOMUX method is simpler to implement but less flexible in pin selection. The XBAR method requires additional configuration but offers greater flexibility when default pins are unavailable.
For your fan tachometer application, the XBAR approach would be beneficial if the default TMR1_TIMER0 pins conflict with other peripherals you're using. Implementation requires enabling XBAR clock, configuring pins for XBAR function, and properly setting XBAR routing registers to map inputs to outputs.
Regards