Add OLCL mode to initBoard() for teensy (#903)

Co-authored-by: csmergs <christopher@smeraglinolo.com>
This commit is contained in:
a32guy 2022-07-27 20:22:42 -04:00 committed by Josh Stewart
parent feb21be0be
commit 92786fd1a6
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ void initBoard()
***********************************************************************************************************
* Idle
*/
if ((configPage6.iacAlgorithm == IAC_ALGORITHM_PWM_OL) || (configPage6.iacAlgorithm == IAC_ALGORITHM_PWM_CL))
if ((configPage6.iacAlgorithm == IAC_ALGORITHM_PWM_OL) || (configPage6.iacAlgorithm == IAC_ALGORITHM_PWM_CL) || (configPage6.iacAlgorithm == IAC_ALGORITHM_PWM_OLCL))
{
//FlexTimer 2, compare channel 0 is used for idle
FTM2_MODE |= FTM_MODE_WPDIS; // Write Protection Disable

View File

@ -35,7 +35,7 @@ void initBoard()
***********************************************************************************************************
* Idle
*/
if( (configPage6.iacAlgorithm == IAC_ALGORITHM_PWM_OL) || (configPage6.iacAlgorithm == IAC_ALGORITHM_PWM_CL) )
if( (configPage6.iacAlgorithm == IAC_ALGORITHM_PWM_OL) || (configPage6.iacAlgorithm == IAC_ALGORITHM_PWM_CL) || (configPage6.iacAlgorithm == IAC_ALGORITHM_PWM_OLCL))
{
PIT_TCTRL0 = 0;
PIT_TCTRL0 |= PIT_TCTRL_TIE; // enable Timer 1 interrupts