RH850/P1L-C SOMC output behaviour

Hi,

I'm working on using the GTM SOMC to generate a single short pulse. I've got the counting and comparing working as expected but I'm struggling with the output settings. Right now I've got it setup to match the value in CCU0 then the value in CCU1 from TBU_TS0. My understanding is for ACB42 I want those bits set to 0b100.

Whenever I trigger an update of the ATOM registers with the HOST_TRIG bit my output goes high no matter the settings i put in ACB10 with a SL of 1. Why is this? No CCU0 match shows so it doesn't seem like it should be triggered. How can I have this start low, go high on CCU0 match then low again on CCU1 match. I can get the opposite to happen just can't get the output to start low no matter the settings I choose.

Cheers

Parents
  • Hi,

    As I understand User's Manual, every update of the registers brings ATOM in the "enabled state". In this state the level at the output pin is equal to SL bit (in your case it is High, die to SL=1). You can only influence that by changing SL to '0'. Try this, but now you would have to modify the comparing strategy to adapt for SL=0.

    Best Regards,
    Vasanth R S

  • Hi Vasanthrs,

    Thank you for the response. I had tried that but the problem being the pin is then high(opposite of SL) until enabled. Is there any solution besides that where the pin remains low until enabled then goes high on the first compare?

  • Hi Williamson,

    This is correct. In disabled state the !SL level is given out. This is the behavior of the SOMC mode and there is not much you can do about it. You could try to manipulate ports (switching them to port mode, output, low level), but I think this will not be acceptable. 

     Why not to switch to SOMP mode?

    Best Regards,
    Vasanth R S

Reply
  • Hi Williamson,

    This is correct. In disabled state the !SL level is given out. This is the behavior of the SOMC mode and there is not much you can do about it. You could try to manipulate ports (switching them to port mode, output, low level), but I think this will not be acceptable. 

     Why not to switch to SOMP mode?

    Best Regards,
    Vasanth R S

Children