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

PSoC™ 4

YoIs_1298666
Level 5
250 sign-ins 100 replies posted 100 sign-ins
Level 5

Hello,

We are thinking of waking up PSoC4S from Deep Sleep by sending and receiving data of I2C slave.

Can we use the following code in "I2CS_I2C_INT.c(I2C slave)" in "void I2CS_I2C_ISR_EntryCallback"?

if (I2CS_CHECK_INTR_SLAVE_MASKED(I2CS_INTR_SLAVE_I2C_ADDR_MATCH |
I2CS_INTR_SLAVE_I2C_GENERAL))                                                                                              [575 and 576 line]

 

If it is from the Sleep mode, we can use this code. but, if it is from the DeepSleep mode, we must wait a few us time. Please see the 201 line in  "I2CS_I2C_ISR_EntryCallback".

YoIs_1298666_4-1642563465114.png

YoIs_1298666_0-1642560545862.png

 

YoIs_1298666_5-1642563637729.png

Best regards,

Yocchi

 

0 Likes
1 Solution
AikoO_51
Moderator
Moderator 50 solutions authored 100 replies posted 50 replies posted
Moderator

Hi,

It has a possibility to miss some problems and failure if it's not operated expected process in generated FW.

So It's recommended to keep using them.

If it must be required to reduce the time during waking up(or matching address), it would be needed to investigate more.

Also, please make sure the operation carefully on your side when it's implemented.

Aiko Ohtaka
Infineon Technologies

View solution in original post

0 Likes
7 Replies
AikoO_51
Moderator
Moderator 50 solutions authored 100 replies posted 50 replies posted
Moderator

As your requirement, you want to pick up just the code of the I2C address match process for wake-up from the interrupt handler, and then operate it in the call back function as a user code separately without a few us time waiting, correct?

Aiko Ohtaka
Infineon Technologies
0 Likes
YoIs_1298666
Level 5
250 sign-ins 100 replies posted 100 sign-ins
Level 5

Hello Aiko-san,

Thank you very much for your help.

That's right.

 

Best regards,

Yocchi

0 Likes
AikoO_51
Moderator
Moderator 50 solutions authored 100 replies posted 50 replies posted
Moderator

Hi,

It has a possibility to miss some problems and failure if it's not operated expected process in generated FW.

So It's recommended to keep using them.

If it must be required to reduce the time during waking up(or matching address), it would be needed to investigate more.

Also, please make sure the operation carefully on your side when it's implemented.

Aiko Ohtaka
Infineon Technologies
0 Likes
YoIs_1298666
Level 5
250 sign-ins 100 replies posted 100 sign-ins
Level 5

Hello Aiko-san,

I am sorry but  I could not understand what you mean.

Is it okay to use it with a delay time in "void I2CS_I2C_ISR_EntryCallback"?

Is it possible to carefully evaluate the delay time and use it?

 

Then, if I don't use DeepSleep, do I do not have to have the delay in "void I2CS_I2C_ISR_EntryCallback"?

 

Best regards,

Yocchi

 

 

0 Likes
AikoO_51
Moderator
Moderator 50 solutions authored 100 replies posted 50 replies posted
Moderator

Yes, you can try the implementation.

But the delay time is to wait for all operations done including the code of the I2C address matching.

So I mean that I can't guarantee the operation when you pick up just the code.

Aiko Ohtaka
Infineon Technologies
0 Likes
YoIs_1298666
Level 5
250 sign-ins 100 replies posted 100 sign-ins
Level 5

Hello Aiko-san,

Is it okay to recognize that I received an answer that included the following questions?

> Then, if I don't use DeepSleep, do I do not have to have the delay in "void I2CS_I2C_ISR_EntryCallback"?

 

Best regards,

Yocchi

0 Likes
AikoO_51
Moderator
Moderator 50 solutions authored 100 replies posted 50 replies posted
Moderator

Yes, it would be the same answer from my side.

Aiko Ohtaka
Infineon Technologies
0 Likes