GPIO LED on my PCB on when connected to programmer debugger MiniPro4 but cant toggle RGB LED on PCB

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

cross mob
invisyguard
Level 2
Level 2
10 sign-ins 5 replies posted 5 sign-ins

GPIO LED on my PCB on when connected to programmer debugger MiniPro4 but cant toggle RGB LED on PCB

I am new to PSOC 6 microcontrollers, I have used ST, ATmel and Microchip and ATSAM ARM processors.

I am using a CY8C6347FMI-BLD53T and have 5 pin connection for programming and debugging. 

See attached for program connection, LED connection and software connected to 5 of my PCBs with  programmer debugger MiniPro4, 

I watched the 101 video and did the same software set up, just changed micro type and pin connection.

Project complies

Connects to my PCB, my Green LED on my PCB switches on when programming.

LED does not flash as per code

Thanks

Dom 

 

0 Likes
1 Solution

Hi Rakshith

I woked it out an dnow have flashing LED going.

It was the global interupts need to be disabled.

I still cant get the F11 debug to go line by line and brake points where I want them.

I only have 5 connections to PSoc 6 chip, see last post for connections. Is this the problem?

Thanks

Dom  

View solution in original post

0 Likes
10 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi @invisyguard

Can you please share the project that you have developed so that we can try to recreate the issue? You could also try programming one of our code examples. This will help us understand if the issue is project-dependent or not.

Also, can you try debugging the device and let us know your observations?

Thanks and Regards,
Rakshith M B
0 Likes

Hi Rakshith

I woked it out an dnow have flashing LED going.

It was the global interupts need to be disabled.

I still cant get the F11 debug to go line by line and brake points where I want them.

I only have 5 connections to PSoc 6 chip, see last post for connections. Is this the problem?

Thanks

Dom  

0 Likes
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi Dom, 

I am not sure I understood why global interrupts need to be disabled to enable the blinking of the LED. Can you please provide more information regarding this? Maybe I am missing something.

You should be able to debug the devices after connecting the programming SWD pins. Please ensure that the Debug Select is set to SWD as shown - 

Rakshith_0-1628071304145.png

Can you please share your project on the thread?

Thanks and Regards,
Rakshith M B
0 Likes

Hi Rakshith

project opuz,com.au

I have worked out you cant have break points and line by line debugging on every bit of code.

My next problem is the A?D set up works fine for  for 2 inputs to give me battery voltage and battery charge with refnce set to VDDA at 3V3.

But I would like to add another A/D input with a totally different A/D setup with refence at 1.2V

Thanks

Dom

0 Likes
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi Dom, 

As long as the line is not optimized by the compiler you should be able to add a breakpoint and step through the line. Could it be possible that the line is optimized by the compiler?

For the ADC query, can you please refer to this Knowledge-Based Article and let me know if it helps? - Dynamically Changing Vref in SAR ADC – KBA227544

Thanks and Regards,
Rakshith M B
0 Likes
invisyguard
Level 2
Level 2
10 sign-ins 5 replies posted 5 sign-ins

Hi Rakshith

Yes you are correct the line is  optimized by the compiler so wont brake there.

I can NOT wait than 100mS for the ADC to settle when changing ref value, I will change the  hardware or only look at other A/D channels occasionally.

How do I draw 2 A/D modules with different REF setting and call both in code?

Thanks

Dom 

 

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi Dom,

The waiting time is for the PSoC6 ADC is actually less. The value is dependent on the bypass capacitor value.

Typical values,

Startup time for reference with external capacitor (50 nF) 120 µs
Startup time for reference with external capacitor (100 nF) 210 µs

This much delay is required in between switching between different VREF sources. When you are using modes which does not use bypass capacitor, this much delay is not required. 

Additionally there is only one SAR ADC resource available on the chip. So you cannot draw 2 ADC modules. You have to change the ADC settings dynamically if you want to use different reference sources.

Best Regards,
Vasanth

0 Likes

Hi Vasanth

If I cant draw 2 ADC then how do I change the ADC setting in code to do both types of references?

Thanks

DOm

 

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi Dom,

You have  to do the measurement on time shared basis. The KBA Rakshit shared  shows how it is done in PSoC4 devices, which is exactly the same for PSoC6 devices. After the required delay you can do a measurement(may be a Readresult call for the channel you are interested in). This way you can do the measurement while switching between reference sources.

Best Regards,
Vasanth

0 Likes

Hi Vasanth

I have charged the hardware to have all inputs no more than 1.2V  so I can have 1.2V REF

Thanks

Dom

0 Likes