# A couple of newbie questions about PSoC

#### ElectricSpidey

Joined Dec 2, 2017
902
So I have learned enough C++ to be dangerous.

I need to know the number of erase/program cycles available to the PSoC CY8C5888LT1-LP097? I ask this because I have to reprogram the chip a lot to fix all of my newbie mistakes.

Also need to know if there is a reboot limit, because I want to power up and down the chip daily, and don’t want to run into problems in the future.

Joined Mar 10, 2018
3,902
No limit on booting

Flash limitation is 100,000 program/erase cycles at room temp.

Regards, Dana

#### ElectricSpidey

Joined Dec 2, 2017
902
Great, that should be enough...

Thanks for the info.

Joined Mar 10, 2018
3,902
As an aside if you have data in FLASH you are updating periodically you
can code a wear leveling approach in FLASH to effect, depending on amount
of data, millions of cycles. Basically you keep track of writes and when they
exceed spec move them to a different block in FLASH.

Regards, Dana.

#### ElectricSpidey

Joined Dec 2, 2017
902
Yo @danadak, hate to keep bothering you but I don’t think many people around here use PSoC.

So my question is… should I use a resistor to drive a MOSFET driver? (PSoC board as above)

I have the board set up to use 4 GPIO pins to drive each MOSFET driver.

The driver is TC4420 the input capacitance is 38pf and has a Schmitt trigger.

There will be 3 total, on the board. (RGB)

Joined Mar 10, 2018
3,902
No R, note in datasheet importance of input Tr and Tf.

That being said if board layout produces a lot of ringing a ~ 10 - 20 ohm R
might be in order.

Regards, Dana.

Last edited:

#### ElectricSpidey

Joined Dec 2, 2017
902
My concern is not overtaxing the micro.

Joined Mar 10, 2018
3,902
The GPIO is speced at rated speed at 25 pF load, so if you
are not at max toggle rate I would not be concerned.

Regards, Dana.

Joined Mar 10, 2018
3,902
There is one aspect to consider, the input of the 4420, its C effective, does not reflect possible
miller C because of stage G. So what looks like, on average, 38 pF will be higher due to miller
in the transition region. That being said since its only got 500 uA drain fed current it may be
a small geometry device. If thats the case no worries. But again you may need a small amount
of R to kill LC effects of trace L and C, to dampen.

Regards, Dana.

#### ElectricSpidey

Joined Dec 2, 2017
902

#### ElectricSpidey

Joined Dec 2, 2017
902
Hello again,

I'm using this code in my alarm project, but the problem is it only works once. In other words when I press the button
the ISR runs, but nothing on the second press.

The interrupt is coming from a GPIO pin.
Arm_Disarm is the name of the ISR.
Ideas?

Code:
CY_ISR (Toggle_Arm)
{
Bell_Enable_Write (0);
Armed_Write(1);
}

int main(void)
{
CyGlobalIntEnable;
Arm_Disarm_StartEx(Toggle_Arm);

Joined Mar 10, 2018
3,902
I just had a knee replacement today so site activity a little restricted. Declare variables as volatile and define in main,then in isr file at top a place to define, but do not assign value so compiler handles. Or do a C isr in main, examples on web for doing a psoc c isr

#### ElectricSpidey

Joined Dec 2, 2017
902
Hope it went well, and you feel ok.

You lost me here, what variables are involved with this process?