Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
user_4371246
Level 1
Level 1
First like received

I'm new with Cypress CPUs (PSoC). In the past I worked with NXP, Microchip and Atmel. (now also Microchip)

At the first sight everthing sounds very easy and workable. I like the thinking of documentation cos I need it for

class B or class C medical software. And I must rate the reliability of the environment.

After 3 days I'm very disapointed. But ok, let's see.

I'm again confused about the easy looking and configurable blocks that not deliver what they promised at the first sight.

Now the block Timer[v2.80]

I set it as desired and choosed Interrupt on TC. I set a Interrupt to the interrupt output.

This timer is conigured to provide every 1ms an INT.

After setting a breakpoint in the INT and rung a debugg sessionI get two times a halt at the breakpoint, then never again.

So what is the problem? Is it a bug?

For demonstrating I created a new project, just for show the problem.

#include "project.h"

uint32 systickcounter = 0;

CY_ISR(SysTick_INT)

{

    systickcounter++;

}

int main(void)

{

SysTick_INT_StartEx(SysTick_INT);

SysTick_Start();

CyGlobalIntEnable; /* Enable global interrupts. */

for(;;)

    {

        /* Place your application code here. */

    }

}

0 Likes
1 Solution
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I've also used NXP (Freescale) MCUs a lot, and I still like them.

But PSoC has its own beauty (and pit holes and traps)...

Anyway, You can access datasheet of a particular component

(1) when you select a component from the Component Catalog

In the right-bottom pane, typical component is shown, and there at the left-upper corner

link to "Datasheet" is located.

000-WorkBench.JPG

(2) or if you have inserted the component in the schematic, double clicking the component opens the configuration dialog

In the left-bottom button is "Datasheet"

001-Config.JPG

Now when you open the Datasheet

In the left, there is an index.

Although I recommend you to read through (or skim through) all,

but for the time being, let's find the suspect.

So I'd click the index "Application Programming Interface"

002-Datasheet.JPG

Now list of available application program interface, aka API is shown.

Again, it won't harm if you read at least the Functions table and Descriptions.

Now let's click the Timer_ReadStatusRegister()

003-API.JPG

Finally we caught the suspect, Timer_ReadStatusRegister(void)

004-ReadStatusRegister.JPG

And its "Side Effects, it is written.

005-SideEffects.JPG

Yes, I agree, that it is not clear nor friendly, but this is the way they implemented the component.

There are other components with "ClearInterrupt()" or "ClearPending()", but unfortunately this one does not.

moto

View solution in original post

0 Likes
6 Replies