cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

invisyguard
New Contributor II

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
invisyguard
New Contributor II

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

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
invisyguard
New Contributor II

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
Rakshith
Moderator
Moderator

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
invisyguard
New Contributor II

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

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
New Contributor II

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

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
invisyguard
New Contributor II

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

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
invisyguard
New Contributor II

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
Top labels