Reply
Posts: 3
Registered: ‎12-05-2016

Timer0/1 Clock Frequency and TH0/TH1 cannot be set in Configurator 4.0.4

Timer 0 and Timer 1 Clock Frequency parameter box in Property of Timers -> Timer Setup are not active.

This means that the code is not generated in InitDevices.c to load TH0 and TH1.

This was working on an earlier version of Hardware Configurator.

 

I made changes to the pin configuration and this regenerated the InitDevice.c file. After rebuild with Configurator 4.0.4, UART0 no longer seemed to be working at correct baud rate. This was caused by TH1 value not being setup during initialisation.

 

In code generated from old version of HW Configurator TH1 = 0x98 for 230

 

From hwconf file:

 

    <property object="TIMER01_0" propertyId="timer01.timer0mode2:8bitcountertimerwithautoreload.targetoverflowfrequency" value="2000"/>
    <property object="TIMER01_0" propertyId="timer01.timer0mode2:8bitcountertimerwithautoreload.timerinitvalue" value="6"/>
    <property object="TIMER01_0" propertyId="timer01.timer0mode2:8bitcountertimerwithautoreload.timerreloadvalue" value="6"/>
    <property object="TIMER01_0" propertyId="timer01.timer1mode2:8bitcountertimerwithautoreload.targetoverflowfrequency" value="230400"/>
    <property object="TIMER01_0" propertyId="timer01.timer1mode2:8bitcountertimerwithautoreload.timerinitvalue" value="152"/>
    <property object="TIMER01_0" propertyId="timer01.timer1mode2:8bitcountertimerwithautoreload.timerreloadvalue" value="152"/>

 

    <property object="TIMER_SETUP_0" propertyId="timer_setup.clockcontrol.timer2lowbyteclockselect" value="Use SYSCLK"/>
    <property object="TIMER_SETUP_0" propertyId="timer_setup.clockcontrol0.timer01prescale" value="SYSCLK / 48"/>
    <property object="TIMER_SETUP_0" propertyId="timer_setup.timer01control.timer1runcontrol" value="Start"/>
    <property object="TIMER_SETUP_0" propertyId="timer_setup.timer1.clocksource" value="Use SYSCLK"/>
    <property object="TIMER_SETUP_0" propertyId="timer_setup.timer1.mode" value="Mode 2, 8-bit Counter/Timer with Auto-Reload"/>
    <property object="TIMER_SETUP_0" propertyId="timer_setup.timer1.timerrunningstate" value="Timer is Running"/>
    <property object="TIMER_SETUP_0" propertyId="timer_setup.timer1.timerswitch1:runcontrol" value="Start"/>


    <property object="UART_0" propertyId="uart.serialportcontrol.actualbaudrate" value="115384 Baud"/>
    <property object="UART_0" propertyId="uart.serialportcontrol.enablereceive" value="Enabled"/>
    <property object="UART_0" propertyId="uart.serialportcontrol.timer1overflowfrequency" value="230.769 kHz"/>

Posts: 2,218
Registered: ‎10-14-2014

Re: Timer0/1 Clock Frequency and TH0/TH1 cannot be set in Configurator 4.0.4

@gvoigt

Could I know which device you are using and facing this issue on?

 

WeiguoLu
Posts: 3
Registered: ‎12-05-2016

Re: Timer0/1 Clock Frequency and TH0/TH1 cannot be set in Configurator 4.0.4

Part is EFM8UB1 MCU on SLSTK2000A DEV BOARD.

Highlighted
Posts: 2,218
Registered: ‎10-14-2014

Re: Timer0/1 Clock Frequency and TH0/TH1 cannot be set in Configurator 4.0.4

@gvoigt

Yes, I could reproduce this. I would create an internal ticket to track this issue.

WeiguoLu
Posts: 464
Registered: ‎02-21-2014

Re: Timer0/1 Clock Frequency and TH0/TH1 cannot be set in Configurator 4.0.4

Hi gvoigt,

 

When I imported your settings, strangely the Timers module wasn't enabled. Once I enabled it, the timer clock settings changed to their correct values:

 

hwconfTimers.png

 

If that doesn't work, could you look at your error log (ctrl+3, then type Error Log) and then hit "Export Log" and post it here?

 

Thanks!