VADC Interrupt generate For Current protection

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

cross mob
UNknown_12
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

Hi All,

I want to cut off the PWM, if current limit is greater or lesser, so i went to Normal conversion mode. The problem it is always generating the interrupt it is not waiting for upper and lower limit, I need any example code to configure normal conversion mode with lower and upper limit. My requirement (if current is greater or lower limit that time it should generate the interrupt).

 

Thanks & Regards,

Unknown

0 Likes
1 Solution
KB
Moderator
Moderator
Moderator
10 solutions authored 50 sign-ins 25 replies posted

Hi UNknown_12,

Although I could not find any  already available code example for limit checking, you can modify available EVADC example code available in Infineon Code Example Repo .

To add limit checking  for already existing example code configure below parameters:

1. Configure Boundary Select Register of the group containing your desired channel. Configure desired BOUNDARY0 & BOUNDARY1 values. (You may do this configuration inside initEVADCGroup() )

KB_0-1651820649172.png

2. Map the BOUNDARY0 & BOUNDARY1 values to appropriate Lower Boundary Select and Upper Boundary Select in the channel control register. And also enable limit checking by selecting appropriate Channel Event Mode in the same register. (You can do this inside initEVADCChannels() )

KB_1-1651821029006.png

 

KB_2-1651821058102.png

3.  Map Channel Event Node pointer to appropriate group request line. (You can do this inside initEVADCChannels() )

KB_3-1651823101653.png

 

4.  Finally configure SRC register with appropriate priority and TOS.  (You can do this inside initEVADCChannels() )

 

Regards,
KB

 

View solution in original post

0 Likes
1 Reply
KB
Moderator
Moderator
Moderator
10 solutions authored 50 sign-ins 25 replies posted

Hi UNknown_12,

Although I could not find any  already available code example for limit checking, you can modify available EVADC example code available in Infineon Code Example Repo .

To add limit checking  for already existing example code configure below parameters:

1. Configure Boundary Select Register of the group containing your desired channel. Configure desired BOUNDARY0 & BOUNDARY1 values. (You may do this configuration inside initEVADCGroup() )

KB_0-1651820649172.png

2. Map the BOUNDARY0 & BOUNDARY1 values to appropriate Lower Boundary Select and Upper Boundary Select in the channel control register. And also enable limit checking by selecting appropriate Channel Event Mode in the same register. (You can do this inside initEVADCChannels() )

KB_1-1651821029006.png

 

KB_2-1651821058102.png

3.  Map Channel Event Node pointer to appropriate group request line. (You can do this inside initEVADCChannels() )

KB_3-1651823101653.png

 

4.  Finally configure SRC register with appropriate priority and TOS.  (You can do this inside initEVADCChannels() )

 

Regards,
KB

 

0 Likes