This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-MSPM0L1306: Timed GPIO Configuration using Sysconfig is failing.

Part Number: LP-MSPM0L1306
Other Parts Discussed in Thread: SYSCONFIG, MSPM0L1306

I'm going to configure timed GPIO output (Whenever Timer register overflows toggle pin) 

Note : I'm not going to toggle pin inside the Timer ISR instead make use of "DL_GPIO_initPeripheralOutputFunctionFeatures" this API.

Tried to do within the sysconfig tool but it doesn't gave expected outpu.

  • Hi Sachin,

    No, you won't be able to setup this up using Sysconfig.  Sysconfig only creates the 'initialization' code to setup the system and peripherals.  If want some action to occur later in your application, you will need to add the specific code.

    I am a little confused about what you are attempting to do.  You want to toggle an IO pin, but not in an ISR when a timer overflows, correct?  Maybe you can create a global variable 'flag' and set that in the ISR, then somewhere back in main() you check if the flag is set and toggle the IO pin there.

    Can you provide some more details?

  • Hi Dennis,

     

    I know that sysconfig will not generate the application code and it will generate initialization code. What I'm trying to say here in this case is, the changes made in the sysconfig (Consider the window shown in attachment) is not replicating in the initialization code.

    Clarification about my application code requirement : I don't want to use toggle GPIO API, instead timer overflow should make an effect for the GPIO pin toggle in the initialization code itself. For more clarity refer PWM generation code.

  • Hi Sachin,

    In order for the timer to set/clear/toggle a GPIO without the CPU executing, you use an event. 

    Using Sysconfig, set the timer to generate an event on Overflow or whatever condition you need, then set the timer as an event publisher.  For the GPIO, select your pin and configure it to be an event subscriber.  Note, there are no interrupts so you don't need a handler and don't need to enable the NVIC timer interrupt.

    I have attached working example for MSPM0L1306.

    timx_timer_mode_periodic_event.zip

  • This suggestion helped me in another way.