CYBT_343026: SPI2_MOSI/Recovery usage in real application

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

cross mob
TaGo_2353976
Level 4
Level 4
5 likes given First like received First like given

Hi,

According to the datasheet of CYBT_343026, this pin should not control from external CPU.

(Please see attached "DS_CYBT.png")

However, this pin could be used to enter "Recovery Mode" according to EVAL board manual and following link.

Programming an EZ-BT WICED Module – KBA223428

Should the customer connect SPI2_MOSI from host CPU or button and sensed "Low" if data corruption in SPI Flash is happened ?

Thank you.

--TAK

0 Likes
1 Solution

Hi TAK,

The Recovery mode is activated at Device Boot up time, either during Power On or Reset.

Hence a Pull Up would be advised, to make sure the SPI2_MISO pin is not accidentally 'Low' during Power On & Reset Conditions.

Once chip boot is complete then the SPI functions normally.

As for the value of the Pull up I do not have a precise value to recommend, but based on my understanding & experience 10K should work.

Regards
Winston

View solution in original post

10 Replies
TaGo_2353976
Level 4
Level 4
5 likes given First like received First like given

DS_CYBT.png

Attached "DS_CYBT.png"

0 Likes
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi TAK,

If you may have to reprogram the CYBT_343026, then its better to keep a recovery button on SPI Mosi . Because some times when you try reprogram the device, the programmer may fail to detect the device. To recover this situation , recovery button have to be used along with reset button.

In this case, please have a recovery button. You may refer the CYBT_343026 Eval board schematics for the same.,

http://www.cypress.com/documentation/development-kitsboards/cybt-343026-eval-ez-bt-module-arduino-ev...

Thanks,
Anjana

Hi Anjana,

According to the following URL, I understand procedure to program FW under Recovery mode is following sequence.

Programming an EZ-BT WICED Module – KBA223428

<Procedure under recovery mode>

1.Sense Low of SPI2_MOSI

2.Power-cycle(Off => On)

3.Module boot-up as recovery mode and start programming.

-----

<Question>

Q1: Is my understanding correct?

Q2: In this procedure, I think SPI2_MOSI is shorted to CYW20706 SPI2_MOSI pin inside CYBT module and CYW20706 may be corrupted.

       In order to avoid it, I think there is following idea

         1. There is a resistor on this line in CYBT module so tthe module will not get damage.

         2. Before sense Low this SPI2_MOSI, host CPU should assert XRES pin to reset the module to avoid short then de-assert XRES.

       Should the customer do #2 idea or other implementation from host CPU side?

Thank you.

--TAK

0 Likes

Hi Anjana,

The customer needs to know exact recovery sequence.

In the other notes(that was asked from my customer), you provided following sequence.

After download to the CYBT-343026-EVAL at the first time,I can never download to CYBT-343026-EVAL

<Recovery Procedure>

1. Press and hold RECOVER button (SW2) |

2. Press and hold RESET button (SW1) for 1 second |

3. Release SW1 |

4. Release SW2 |

5. Re-program the board |

They needs to know following points that is including my previous question.

<Question>

Q1: In this sequence, is there any possibility to get damage in the CYW20706 by shorting SPI2_MOSI from external CPU?

If there is no damage, please tell me how?

Q2: How long time should the customer has waiting time between #3 and #4 ?

       10ms from releasing XRES pin to releasing SPI2_MOSI is enough ?

Thank you.

--TAK

0 Likes

Hi anpm

my customer design is stopped by this question so could you take it as soon as possible???

Thank you.

--TAK

0 Likes

Hi TAK,

Q1: No there is no chance for damage for the chip. But I think since its connected to an external MCU, you may connect pull up resistor on the SPI lines.

Suppose if a scenario comes similar to recovery procedure, and SPI line goes low to high in between a reset then there is a chance that chip will get into recovery mode and will wait for a new program download . At this time application will stop running (unless you press a reset again) assuming that flash is corrupted. So to avoid this situation (unnecessary low - high transition on SPI line) , you may connect pull up resistor.

Q2: Our Module team have tested with 100ms in large production.

Thanks & Regards,

Anjana

Hi anpm

Thanks.

For just in case, could you tell me recommended resistor value of pull-up on SPI2_MOSI.


I'm not sure whether there is internal pull-up or something.

If there is, we need to care resistor value for it.

Thank you.

--TAK

0 Likes

Hi anpm

Sorry for many questions.

>Q1: No there is no chance for damage for the chip.

Do you mean that external CPU sense "Low" to SPI2_MOSI during module is power-on ?

Is that correct?

The customer is assuming that current procedure is under power-off state but I think it is under power-on.

In summary, the following procedure is right way to enter recovery mode.

<Recovery Procedure>

0. Power-On

1. RECOVER(SPI2_MOSI) set Low

2. XRES set Low more than 1 second

3. Release XRES

4. Release RECOVER(SPI2_MOSI) after 100ms

5. Re-program the board

Thank you.

--TAK

0 Likes

Hi TAK,

The Recovery mode is activated at Device Boot up time, either during Power On or Reset.

Hence a Pull Up would be advised, to make sure the SPI2_MISO pin is not accidentally 'Low' during Power On & Reset Conditions.

Once chip boot is complete then the SPI functions normally.

As for the value of the Pull up I do not have a precise value to recommend, but based on my understanding & experience 10K should work.

Regards
Winston

Hi Winston,

Thanks for that,

The customer will implement open-drain buffer(Hi-Z 0.1MΩ) on SPI2_MOSI.

I think it is useful.

If it is not good idea, please let me know.

Thank you.

--TAK

0 Likes