Hello. We are using the Hercules Board RM48L952ZWT, and we received the demo software for the board. We had a question on how to configure NHET/PWM using HalCoGen along with the TI code. In the TI sample code we can see that various NHET pins (i.e., 0,2,4,5,25,...] are set up to generate varying hardcoded pulse widths to blink the Hercules Board's associated LEDs via a manual while loop in the TI code. (code from TI further below)
When we generated a new driver library with HalCoGen (and then the TI demo is run off of this driver library), then going to i.e., HET1 interface . It seems the hardcoded TI code overrides the default HalCoGen configuration anyhow, so it is touch to understand how to apply to our requirements. is it possible just using HalCoGen to configure the same as the hardcoded TI while loop?
We are trying to understand how to use HalCoGen to configure our PWMs with the different tabs using the black box model (HETx Global Timing Configuration, PWM0-7, PWM Interrupts, Edge 0-7, Edge Interrupts, Cap0-7) according to our requirements (and if using the black box model is feasible for NHETx PWM). Thank you.
(from TI sample project for NHET LED demo)
pwm = 0;
count = 0;
/** - Do the LED Demo Toggle, until another task selected
* - The below loop generates a varying pulse width at
* HET pins[0,2,4,5,15,16,17,18,20,27,29,31]
* which helps in blinking LED demo */
while(toggleLoop > 0)
{
/** - Set NHET Pins 29,31,0,17,18,25
* - Set NHET Pins 20,5,2,16,27,4
* - This turns the white LEDs on and the RGB LEDs off*/
hetREG1->DOUT = 0xAA170035;
for(temp=0;temp<pwm;temp++);
if((pwm == 0x800))
{
for(temp=0;temp<0x100000;temp++);
}
delay1sec();
/** - Clr all NHETs (turns on RGB LEDs) */
hetREG1->DOUT = 0x00000000;
for(temp=0;temp<(0x800 - pwm);temp++);
if((pwm == 0x00))
{
for(temp=0;temp<0x100000;temp++);
}
if(pwm == 0x800)
{
count = 1;
}
if(pwm == 0)
{
count = 0;
}
if(count != 0)
{
pwm--;
}
else
{
pwm++;
}
toggleLoop --;
delay1sec();
}
/** - Clear HET pins end of the demo */
hetREG1->DOUT = 0; //0x08110034;