Debug of CYBT-343026-EVAL and CYBT-353027-EVAL using Modus / MiniProg4

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

cross mob
KeTa_1341526
Level 5
Level 5
Distributor - TED (Japan)
10 likes given 10 likes received 5 likes given

Hello,

I am trying to build a Debug environment using MiniProg4 on CYBT-343026-EVAL and CYBT-353027-EVAL.

The "README.md" included in the Modus sample design has the following description.

------------------------------------

CYBT-343026-EVAL/CYBT-353027-EVAL: SWD signals are routed to P11=SWDCK and P15=SWDIO. Use expansion connectors to connect VDD, GND, SWDCK, and SWDIO to your SWD Debugger probe.

------------------------------------

However, I don't think that pin is assigned in each Module.

[CYBT-343026-EVAL]

 - SWDCK=P11 : Pad 23 (GPIO_6)

 - SWDIO=P15 : There is no Pad

[CYBT-353027-EVAL]

 - SWDCK=P11 : There is no Pad

 - SWDIO=P15 : There is no Pad

 

I think I need to re-specify the pins for each SWD pin.

I checked the following files and thought that each SWD pin could be assigned.

------------------------------------

mtb_shared\wiced_btsdk\dev-kit\baselib\20706A2\release-v3.0.0\COMPONENT_20706A2\WICED\common\wiced_swd_interface.h

------------------------------------

[CYBT-343026-EVAL]

 - SWDCK=P11 : Pad 23 (GPIO_6)

 - SWDIO=P12 : Pad 04 (I2C_SDA)

[CYBT-353027-EVAL]

 - SWDCK=UART_TXD : Pad 10 (UART_TXD)

 - SWDIO=UART_RXD : Pad 12 (UART_RXD)

 

I modified the following make file to reflect the modified settings above.

------------------------------------

[CYBT-343026-EVAL]

mtb_shared\wiced_btsdk\dev-kit\bsp\TARGET_CYBT-343026-EVAL\release-v3.1.0\CYBT-343026-EVAL.mk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ifeq ($(ENABLE_DEBUG),1)

CY_CORE_DEFINES+=-DSWD_CLK=SWDCK_ON_P11

#CY_CORE_DEFINES+=-DSWD_IO=SWDIO_ON_P15

CY_CORE_DEFINES+=-DSWD_IO=SWDIO_ON_P12

endif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[CYBT-353027-EVAL]

mtb_shared\wiced_btsdk\dev-kit\bsp\TARGET_CYBT-353027-EVAL\release-v3.1.0\CYBT-353027-EVAL.mk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ifeq ($(ENABLE_DEBUG),1)

#CY_CORE_DEFINES+=-DSWD_CLK=SWDCK_ON_P11

CY_CORE_DEFINES+=-DSWD_CLK=SWDCK_ON_UART_TXD

#CY_CORE_DEFINES+=-DSWD_IO=SWDIO_ON_P15

CY_CORE_DEFINES+=-DSWD_IO=SWDIO_ON_UART_RXD

endif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

------------------------------------

When I tried the above, I was able to connect with [CYBT-343026-EVAL].

However, [CYBT-353027-EVAL] cannot connect and the FW cannot be reprogrammed.

 

I have a question based on the above.

 

Q1.

Since the debugger was able to connect with [CYBT-343026-EVAL], I think that this method is good for changing the pin assignment.

Is that recognition?

 

Q2.

Is the phenomenon that [CYBT-353027-EVAL] cannot be connected and cannot be reprogrammed due to the use of HCI_UART?

In that case, is there a way to debug with [CYBT-353027-EVAL]?

 

Best regards,

TK

1 Solution
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,

As you see, the kit doesn't have enough PINs to fully support the hardware debugging conveniently.

You may have two options:

  1. Only use software debugging method, i.e. log printing via UART. You can insert your log-stakes in your code. Or you can output the WICED HCI Messages of Bluetooth protocol trace via UART by the function wiced_bt_dev_register_hci_trace(). This should give you enough information to debug the kit and it's the recommended debugging method of WICED BT chips. See the manual:
    CypressAcademy WBT101: CH05 Debugging
  2. You can switch to other modular kits which reserve enough PINs for SWD usage, like CYBT-423028-EVAL.

Best regards

View solution in original post

0 Likes
6 Replies
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,

Q1:Changing the pin assignment of SWD is good and recommended. However, don't route the SWD pins to the occupied pins, i.e. UART_TXD/UART_RXD, even if the functions are not in use currently. Please route them to the available GPIOs first.

Q2: Yes. In your case, the signals are mixed so SWD signals are malfunctioning. Please try to route the SWD pins to the available GPIOs first.

Best regards

0 Likes
KeTa_1341526
Level 5
Level 5
Distributor - TED (Japan)
10 likes given 10 likes received 5 likes given

Hi,

Thank you for your reply.

>Q2: Yes. In your case, the signals are mixed so SWD signals are malfunctioning. Please try to route the SWD pins to the available GPIOs first.

However, the pins that can be used in CYBT-353027-02 are as follows.


mtb_shared\wiced_btsdk\dev-kit\baselib\20706A2\release-v3.0.0\COMPONENT_20706A2\WICED\common\wiced_swd_interface.h
--------------------------------------------------------------------------------
/* Enum of all the possible pins through which SWDCK can be routed. */
typedef enum
{
SWDCK_DISABLED = -1,
SWDCK_ON_UART_TXD,
SWDCK_ON_SMUX,
SWDCK_ON_P14,
SWDCK_ON_P11,
SWDCK_ON_P30
}SWDCK_pin_t;

/* Enum of all the possible pins through which SWDIO can be routed. */
typedef enum
{
SWDIO_DISABLED = -1,
SWDIO_ON_UART_RXD,
SWDIO_ON_SMUX,
SWDIO_ON_P15,
SWDIO_ON_P12,
SWDIO_ON_P31
}SWDIO_pin_t;
--------------------------------------------------------------------------------

CYBT-353027-EVAL      
2 GPIO_4 GPIO_4/P1/I2S_CLK/PCM_CLK Open (Connector)  
3 P11 P11/I2S_WS/PCM_SYNC Open (Connector), D1 SWDCK_ON_P11
4 P3 P3/I2S_DI/PCM_IN Open (Connector[I2C_SDA])  
6 GPIO_5 BT_GPIO_5/P8/P33 PUART_RXD  
8 GPIO_0 BT_GPIO_0 Open (Connector)  
9 GPIO_1 BT_GPIO_1 Open (Connector)  
16 GPIO_3 BT_GPIO_3/P0 PUART_TXD  
18 GPIO_6 BT_GPIO_6/P9/I2S_DO/PCM_OUT Open (Connector[I2C_SCL])  

 

Therefore, there is no pin other than SWDIO_ON_UART_RXD that SWDIO can assign.

* SWDCK seems to be able to be assigned to P11.

 

How can you solve it?

 

Best regards,

TK

0 Likes
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,

Then try to pull off all the switches of SW5, a.k.a. PUART, to stop the signals of PUART physically. To be more adequate, pull off SW4 as well after you downloaded the firmware.

If it doesn't help, try to disable PUART in code.

Best regards

0 Likes
KeTa_1341526
Level 5
Level 5
Distributor - TED (Japan)
10 likes given 10 likes received 5 likes given

Hi,

In CYBT-353027-EVAL (CYBT-353027-02), if TX / RX of HCIUART is assigned to the SWD pin, Firmware cannot be programmed by Modus Tool Box or Chipload.exe.

 

Can your answer solve it?

 

I tried it, but I still couldn't program the FW.

 

Best regards,

0 Likes
KeTa_1341526
Level 5
Level 5
Distributor - TED (Japan)
10 likes given 10 likes received 5 likes given

Hi,

Is there a solution?

Best regards,

0 Likes
Charles_Lai
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 sign-ins

Hi,

As you see, the kit doesn't have enough PINs to fully support the hardware debugging conveniently.

You may have two options:

  1. Only use software debugging method, i.e. log printing via UART. You can insert your log-stakes in your code. Or you can output the WICED HCI Messages of Bluetooth protocol trace via UART by the function wiced_bt_dev_register_hci_trace(). This should give you enough information to debug the kit and it's the recommended debugging method of WICED BT chips. See the manual:
    CypressAcademy WBT101: CH05 Debugging
  2. You can switch to other modular kits which reserve enough PINs for SWD usage, like CYBT-423028-EVAL.

Best regards

0 Likes