Last active
April 9, 2024 11:58
-
-
Save r0oland/917d139159e1eb8d60bc2ec34afbf6a3 to your computer and use it in GitHub Desktop.
NXP iMX XBAR PWM AOI Notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------------ | |
void vlc_xbar_init(void) { | |
// Initialise multiplexer | |
XBARA_Init(XBARA1); | |
XBARB_Init(XBARB2); | |
// disable faults for cam1 and cam2 PWM systems so they can be enabled | |
XBARA_connect(XBAR_ENABLE, kXBARA1_OutputFlexpwm1Fault0); | |
XBARA_connect(XBAR_ENABLE, kXBARA1_OutputFlexpwm2Fault0); | |
// disable before setting up IRQ to make sure we don't get any false triggers | |
XBARA_connect(XBAR_DISABLE, kXBARA1_OutputDmaChMuxReq30); | |
XBARA_connect(XBAR_DISABLE, kXBARA1_OutputDmaChMuxReq31); | |
// external trigger signal is routed trough CMP3 and CMP4 to be able to | |
// invert the trigger signal | |
XBARB_connect(kXBARB2_InputAcmp3Out, kXBARB2_OutputAoi1In00); | |
XBARB_connect(kXBARB2_InputAcmp4Out, kXBARB2_OutputAoi1In01); | |
vlc_xbar_setup_ext_trig_iqr(); | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment