![]() |
MSPM0_ValvanoWare
1.0
ECE445L starter code
|
Debugging tools. More...
Macros | |
| #define | PAoutPin0Bit0 (GPIOA->DOUT31_0&1) |
| using PAoutPin0Bit0 places PA0 output on bit 0 | |
| #define | PBoutPin22Bit1 (((GPIOB->DOUT31_0&(1<<22))>>21)) |
| using PBoutPin22Bit1 places PB22 output on bit 1 | |
| #define | PBoutPin26Bit2 (((GPIOB->DOUT31_0&(1<<26))>>24)) |
| using PBoutPin26Bit2 places PB26 output on bit 2 | |
| #define | PBoutPin27Bit3 (((GPIOB->DOUT31_0&(1<<27))>>24)) |
| using PBoutPin27Bit3 places PB27 output on bit 3 | |
| #define | PAinPin18Bit4 (((GPIOA->DIN31_0&(1<<18))>>14)) |
| using PAinPin18Bit4 places PA18 input on bit 4 | |
| #define | PBinPin21Bit5 (((GPIOB->DIN31_0&(1<<21))>>16)) |
| using PBinPin21Bit5 places PA21 input on bit 5 | |
Functions | |
| void | Debug_Init (void) |
| Initialize arrays. More... | |
| uint32_t | Debug_Dump (uint32_t data) |
| Debugging dump. More... | |
| uint32_t | Debug_Dump2 (uint32_t data) |
| Debugging dump with filter. More... | |
| uint32_t | Debug_Period (uint32_t mask) |
| Initialize arrays. More... | |
| uint32_t | Debug_Duty (uint32_t mask) |
| Initialize arrays. More... | |
| uint8_t | TExaS_LaunchPadLogic (void) |
| PB21,PA18,PB27,PB26,PB22,PA0. More... | |
| uint8_t | TExaS_PB22PA0Logic (void) |
| PB22,PA0. More... | |
| uint8_t | TExaS_PA60Logic (void) |
| PA6-PA0. More... | |
| uint8_t | TExaS_PB18PB17PB16PB2PB1PB0Logic (void) |
| PB18-16 outputs, PB2-0 input. More... | |
| void | TExaS_Init (ADC12_Regs *adc12, uint32_t channel, uint8_t(*logic)(void)) |
| Initialize TExaS. More... | |
Debugging tools.
| uint32_t Debug_Dump | ( | uint32_t | data | ) |
Debugging dump.
Records one data and one time into the two arrays.
| data | is value to store in DataBuffer |
| uint32_t Debug_Dump2 | ( | uint32_t | data | ) |
Debugging dump with filter.
One first call record data and time. On subsequent calls, only record data and one time only if the data differs from the last recording
| data | is value to store in DataBuffer |
| uint32_t Debug_Duty | ( | uint32_t | mask | ) |
Initialize arrays.
Calculate duty cycle of the recorded data using mask.
Period is defined as rising edge (low to high) to the next rising edge.
High is defined as rising edge (low to high) to the next falling edge.
Duty cycle is (100*High)/Period
| mask | specifies which bit(s) to observe |
| void Debug_Init | ( | void | ) |
Initialize arrays.
Initialize the debugging dump buffers
| none |
| uint32_t Debug_Period | ( | uint32_t | mask | ) |
Initialize arrays.
Calculate period of the recorded data using mask
| mask | specifies which bit(s) to observe |
| void TExaS_Init | ( | ADC12_Regs * | adc12, |
| uint32_t | channel, | ||
| uint8_t(*)(void) | logic | ||
| ) |
Initialize TExaS.
Initialize TExaS scope or logic analyzer
Sends one 8-bit data to PC at 10kHz
| adc12 | is ADC0 or ADC1 (set to 0 for logic analyzer) |
| channel | specifies ADC channel 0 to 7 |
| logic | function that returns an 8-bit value with bit 7 set |
| uint8_t TExaS_LaunchPadLogic | ( | void | ) |
PB21,PA18,PB27,PB26,PB22,PA0.
To configure logic analyzer for PB21,PA18,PB27,PB26,PB22,PA0 call TExaS_Init(0,0,&TExaS_LaunchPadLogic);
| none |
| uint8_t TExaS_PA60Logic | ( | void | ) |
PA6-PA0.
To configure logic analyzer for PA6-PA0 outputs call TExaS_Init(0,0,&TExaS_PA60Logic);
| none |
| uint8_t TExaS_PB18PB17PB16PB2PB1PB0Logic | ( | void | ) |
PB18-16 outputs, PB2-0 input.
To configure logic analyzer for PB18-16 outputs, PB2-0 input call TExaS_Init(0,0,&TExaS_PB18PB17PB16PB2PB1PB0Logic);
| none |
| uint8_t TExaS_PB22PA0Logic | ( | void | ) |
PB22,PA0.
To configure logic analyzer for PB22,PA0 call TExaS_Init(0,0,&TExaS_PB22PA0Logic);
| none |