USING ALTERNATE DEFINITIONS OF PINS - HOW TO?
Getting myself really confused on this one, trying to read the manual and testing. Looking at PINs 0 and 1 for instance the default is Serial1 (LPUART6). Now if I want to reassign it to XBARA or FLEXCAN. I was looking at the quadrature encoder module and it use the xbara pins for input. Anyway this is the process I think:
1. Turn LPUART6 clock off (CCGR3)
2. Disable the LPUART6 IRQ
3. didn't see a way to update the vtable so guess that stays
4. Update pin configurations, i.e.,
Code:
000 ALT0 — Select mux mode: ALT0 mux port: FLEXCAN2_RX of instance: flexcan2
001 ALT1 — Select mux mode: ALT1 mux port: XBAR1_INOUT17 of instance: xbar1
010 ALT2 — Select mux mode: ALT2 mux port: LPUART6_RX of instance: lpuart6
and sion bit to enable
5. Select input - output modes for pins, i.e.
Code:
IOMUXC_FLEXCAN2_RX_SELECT_INPUT for Flexcan
xbar_connect (saw this in pwm.c)
6. Configure Flexcan2 or Xbar clocks
7. Enable clocks with CCM_CCGR0 or CCM_CCGR2
8. Almost forgot enable IRQs for XBAR or FLEXCAN2
Still need to work some of the details but just want to see if this makes sense and I am on the right track.