Disabling interrupt during debugging

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

cross mob
Anonymous
Not applicable

with interrupts the exit status of the ports change. Pin_Write (1); and Pin_Wrote is low (0); is high.

thx.

0 Likes
10 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I am very sorry, but I cannot understand the question. Can you please try to say that again? You could try to use google translator which works best when there are many words used. It often fails with sentences too short.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

problem using interrupts, functions are changed. Pin_Write(1); now is low and Pin_Write(0); is high.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Definitively not.

   

Please post your project. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Which development kit are you using?


Bob
 

0 Likes
Anonymous
Not applicable

I have the kit PSOC5 first touch CY8CKIT_014,  I need to function normally, I use an interrupt and now have problems with logical port status.

   

example: Pin_Write (1); is a low state and Pin_Write(0); is high.

I found this on page Cypress but not how to use it.

   

 Interrupt can be disabled during debugging by writing to the register ‘NVIC.CLRENA0: 0xE000E180’ (32 bits)(in case of PSoC5) and INTC_CLR_EN:0x44c8(8 bits)(in case of PSoC3). For further detail, please refer to the register TRM of PSoC3 or PSoC5.

To write to these register, please follow the following steps-

->Click on debugging tab.

->Debugging and memory window will open.

-> Go to the memory window and update the memory space (0xE000E180 for PSoC 5 or 0x44c8 for PSoC3).

To disable the interrupt, write 0xffff in the NVIC.CLRENA0: 0xE000E180 register in case of PSoC5 and 0xff in the INTC_CLR_EN:0x44c8 register in case of PSoC3.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Which Creator version are you using?

   

How do you verify that the output stage of the pin you write to is reverted? LED ??

   

Which port and which pin on your kit are you testing?

   

 

   

Bob

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored
        
  1. Where in your program do you write to the ports? In the ISR or in your main program?
  2.     
  3. If its the latter, does the ISR do something with GPIOs?
  4.     
  5. How do you know that the ports misbehave?
  6.     
  7. Does the problem only occur during debugging, or when the program runs normally?
  8.     
  9. if its the latter, does it run when you just don't enable your ISR?
  10.     
  11. What happens when you just out-comment your ISR - does it work then?
  12.    
0 Likes
Anonymous
Not applicable

 I use version 1.0 and creator before working with interrupts the change status for ports.

I will prove to Write () function; lighting a LED.
I used pin_Write (1); and LED ensendia and now with the same function is turned off.

0 Likes
Anonymous
Not applicable

void Pin_1_Write( uint8 value )
Description: Writes the value to the physical port (data output register), masking and shifting the bits
appropriately. This function avoids changing other bits in the port by using the appropriate
method (read-modify-write or bit banding).
 

   

Parameters: uint8 value: Value to write to the component instance.
 

   

Return Value: None
 

   

Side Effects: Do to the use of read-modify write operations that are not atomic; it is possible for
Interrupt Service Routines (ISR) to cause corruption of this API. An ISR that interrupts
this API and performs writes to the Pins component Data register may cause corrupted
port data. To avoid this issue it is recommended to either use the Per-Pin APIs (primary
method) or disable interrupts around this API.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Creator 1.0 is reayll really old. Upgrade to the current 3.1 as it fixes many bugs. If you are on PSoC5 (without the LP) go to 2.2 as its the latest version that supports these chips.

0 Likes
Anonymous
Not applicable

Thank you.

0 Likes