PSOC1, Designer 5.4, Counter24 API error

A catchall for PSoC Mixed-Signal Array (microcontroller) discussions not captured by the other forums.

Moderator: ericb

PSOC1, Designer 5.4, Counter24 API error

Postby Mr_E » Thu Jan 30, 2014 6:23 am

Counter24, version 2.5 contains the following error:

Background: Function Counter24_ReadCounter disables the clock input to stop the timer while reading the count.

Implementation: reg[Counter24_INPUT_MSB_REG] is zeroed out to disable the clock. However testing shows that the timer still runs.

Fix: zero out reg[Counter24_INPUT_LSB_REG] instead.

Also, the control register appears to be saved/restored, but never modified. Since the control register's only purpose is to start/stop the module, I suspect this was originally used when reading the counter, but the method was later switched to disabling the clock.
User avatar
Mr_E
The Big Cheese
The Big Cheese
 
Posts: 297
Joined: Wed Aug 11, 2004 7:08 am
Website: http://www.microframecorp.com
Location: Oklahoma, USA

Re: PSOC1, Designer 5.4, Counter24 API error

Postby danadak » Thu Jan 30, 2014 12:19 pm

Just a suggestion, consider filing a CASE to let Cypress know they have
a tool error.

To create a technical case at Cypress -

www.cypress.com
“Support”
“Technical Support”
“Create a Case”

You have to be registered on Cypress web site first.

Regards, Dana.
Field Application Engineer
KB1RHB Mostly listen :)
Semi Retired
User avatar
danadak
The Big Cheese
The Big Cheese
 
Posts: 2008
Joined: Thu Dec 27, 2007 8:42 am
Location: New Hampshire

Re: PSOC1, Designer 5.4, Counter24 API error

Postby Mr_E » Fri Jan 31, 2014 8:47 am

Done, and I even suggested another improvement to the code.
User avatar
Mr_E
The Big Cheese
The Big Cheese
 
Posts: 297
Joined: Wed Aug 11, 2004 7:08 am
Website: http://www.microframecorp.com
Location: Oklahoma, USA


Return to “%s” PSoC1 General

Who is online

Users browsing this forum: Bing [Bot] and 2 guests