How to port CYW920721M2EVK-02 sample app to CYW920721B2EVK-02?

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

cross mob
lock attach
Attachments are accessible only for community members.
tayo
Level 5
Level 5
Distributor - Macnica (Japan)
100 replies posted 25 solutions authored 250 sign-ins

Hello Infineon support team.

According to the attachment, since Bluetooth SDK 3.3, CYW920721B2EVK-02 evaluation kit became out of support.
And The CYW920721M2EVK-02 is the replacement for this kit. We are no longer able to refer CYW920721B2EVK-02 BSP on the latest ModusToolBox.

However, at least CYW920721M2EVK-02 sample app "Audio_Headset_and_Speaker" does not work well on CYW920721B2EVK-02 EVB.
Because the defined pin assignment is different between them.

Please advice me to port CYW920721M2EVK-02 sample app to CYW920721B2EVK-02 on ModusToolBox?

Thanks,
Tayo

0 Likes
1 Solution
tayo
Level 5
Level 5
Distributor - Macnica (Japan)
100 replies posted 25 solutions authored 250 sign-ins

Hello Zhang-san

This issue was resolved by following modifications.
========================================
- Comment out below code in Makefile
CY_APP_DEFINES += -DPLATFORM_LED_DISABLED

- Replace following source code from BTSDK rev 3.2 environment.
wiced_platform.h
platform.c
cycfg.c
cycfg.h
cycfg_notices.h
cycfg_pins.c
cycfg_pins.h
cycfg_routing.h
========================================

Thank you for your kindly support.

Thanks,
Tayo

View solution in original post

0 Likes
12 Replies
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

I compared the platform files for the two bsp. Following are the differences between them.

Could you try to change them and try again?

Owen_Zhang123_0-1658110961783.png

Also, if the demo still works abnormal, please specify the problem so we can check it.

 

0 Likes
tayo
Level 5
Level 5
Distributor - Macnica (Japan)
100 replies posted 25 solutions authored 250 sign-ins

Hello Zhang-san

I got it. We are testing, thank you. 

BTW, I would like to refer the schematic of CYW920721M2EVK EVB. Where can I find it?

Thanks,

Tayo

 

0 Likes
lock attach
Attachments are accessible only for community members.
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

Please find the schematic in the attachment.

0 Likes
tayo
Level 5
Level 5
Distributor - Macnica (Japan)
100 replies posted 25 solutions authored 250 sign-ins

Hello Zhang-san

Thank you for the schematic releasing.

We modified the wiced_platform.h accordance with your advice. Then CYW920721B2EVK-02 works fine the BT connection using  a sample app "Audio_Headset_and_Speaker". 

However LED2(D2) on the EVB does not work well yet.   Do you have any advice for it?

Thanks,

Tayo

 

 

 

0 Likes
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

I checked the schematic for CYW920721B2EVK-02. The LED1 and LED2 use P27 and P26. 

Could you try to change it as follows:

/*! pin for LED 1 */
#define WICED_GPIO_PIN_LED_1 WICED_P27
/*! pin for LED 2 */
#define WICED_GPIO_PIN_LED_2 WICED_P26

0 Likes
tayo
Level 5
Level 5
Distributor - Macnica (Japan)
100 replies posted 25 solutions authored 250 sign-ins

Hello Zhang-san

I thought the same as you, and already attempted it. However, the LED did not work yet.

Now I'm checking source codes of Audio_Headset_and_Speaker" app. There is following code in headset_control.c

=========

#ifndef PLATFORM_LED_DISABLED
/*LED config for app status indication */

static wiced_led_config_t led_config =
{
.led = PLATFORM_LED_1,
.bright = 50,
};
#endif

==============

Under my environment, above codes seems disable. Maybe PLATFORM_LED_DISABLED is defined somewhere, I guess.  Do you think if the code relates the LED2 issue?

Thanks,

Tayo

0 Likes
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

I tested the hal_gpio demo on CYW920721B2EVK-02. The LED can work successfully on P26 and P27. So this should not be a hardware issue. I checked the Audio_Headset_and_Speaker demo, the LED2 is not used.

What do you mean "LED2 can't work well"? Did you add the related code to control LED2?

0 Likes
tayo
Level 5
Level 5
Distributor - Macnica (Japan)
100 replies posted 25 solutions authored 250 sign-ins

Hello Zhang-san

I also see that LED2 works using hal_gpio.  But in the case of Audio_Headset_and_Speaker app, it does not work yet.

The LED I mentioned is the following LED which is described in headset_control.c

==============

* Setting up Connection
* 1. press and hold the SW15 on BT board for at least 2 seconds.
* 2. This will set device in discovery mode(A2DP,HFP and BLE) and LED will start blinking.

==============

It's my understanding that the LED is LED2(D2) on CYW920721B2EVK-02. Is it wrong? 

 

Thanks,

Tayo

0 Likes
tayo
Level 5
Level 5
Distributor - Macnica (Japan)
100 replies posted 25 solutions authored 250 sign-ins

Hello Zhang-san

Our request is very simple.

Please tell me the way to work LED on  CYW920721B2EVK-02 EVB when Audio_Headset_and_Speaker app is running.

Thanks,

Tayo

0 Likes
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

I am using the following button configure. When I long press the CUSTOM button on the AUDIO board, I can see the LED2(D2) blinking.

/*! pin for LED 1 */
#define WICED_GPIO_PIN_LED_1 WICED_P26
/*! pin for LED 2 */
#define WICED_GPIO_PIN_LED_2 WICED_P27

#define WICED_PUART_TXD WICED_P32
#define WICED_PUART_RXD WICED_P33

///*! pin for LED 1 */
//#define WICED_GPIO_PIN_LED_1 WICED_P25
///*! pin for LED 2 */
//#define WICED_GPIO_PIN_LED_2 WICED_P29
//
//#define WICED_PUART_TXD WICED_P32
//#define WICED_PUART_RXD WICED_P37

//#define WICED_BUTTON1 (WICED_P00)
//#define WICED_BUTTON2 (WICED_P38)
//#define WICED_BUTTON3 (WICED_P34)
//#define WICED_BUTTON4 (WICED_P17)
//#define WICED_RESET_PIN WICED_P21
#define WICED_BUTTON1 (WICED_P05)
#define WICED_BUTTON2 (WICED_P14)
#define WICED_BUTTON3 (WICED_P04)
#define WICED_BUTTON4 (WICED_P00)
#define WICED_RESET_PIN WICED_P33

0 Likes
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

To avoid the codec drive error during the initiate process, you also need to change the SPI interface for the codec in the cycfg_pins.c and cycfg_pins.h file as follows:

Owen_Zhang123_0-1658742248175.png

 

0 Likes
tayo
Level 5
Level 5
Distributor - Macnica (Japan)
100 replies posted 25 solutions authored 250 sign-ins

Hello Zhang-san

This issue was resolved by following modifications.
========================================
- Comment out below code in Makefile
CY_APP_DEFINES += -DPLATFORM_LED_DISABLED

- Replace following source code from BTSDK rev 3.2 environment.
wiced_platform.h
platform.c
cycfg.c
cycfg.h
cycfg_notices.h
cycfg_pins.c
cycfg_pins.h
cycfg_routing.h
========================================

Thank you for your kindly support.

Thanks,
Tayo

0 Likes