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

cross mob
ravo
Level 5
Level 5
10 likes received 5 comments on blog 5 solutions authored

Dears

When I upgrade project using Libraries mtb-hal-cat1 from 1.6.0 to newer 2.X. I have several problems. Maybe I am doing something in wrong way... when updating libs.

For example on this project https://github.com/Infineon/mtb-example-psoc6-usb-audio-device-freertos

void audio_app_clock_init(void)
{
/* Initialize the PLL */
cyhal_clock_get(&pll_clock, &CYHAL_CLOCK_PLL[0]);
cyhal_clock_init(&pll_clock);

/* Get the reset USB clock */
cyhal_clock_get(&usb_rst_clock, &CYBSP_USB_CLK_DIV_obj);
}

passing argument 2 of 'cyhal_clock_get' from incompatible pointer type [-Wincompatible-pointer-types]

I tried investigate what is wrong in "mtb-hal-cat1" library

cyhal_clock.h

1.6.0

extern const cyhal_resource_inst_t CYHAL_CLOCK_PLL[SRSS_NUM_PLL];

> = 2.0.1

extern const cyhal_clock_t CYHAL_CLOCK_PLL[_CYHAL_SRSS_NUM_PLL];

And Structure cyha_clock_t has deprecated two elements:

cy_en_divider_types_t div_type; /*!< Deprecated */
uint8_t div_num; /*!< Deprecated */

But in corespondent C source code cyhal_clock.c the function cyhal_clock_get, is still defined with 2nd parameter as type "cyhal_resource_inst_t" used in 1.6.0 version

cy_rslt_t cyhal_clock_get(cyhal_clock_t *clock, const cyhal_resource_inst_t *resource)

How to correct this situation ? I can create own structures as workaround.  But I don't wont to modify shared libraries... (to still have possible update in feature)

And for last are there any releases notes for each revision of specific library ? It is a bit of detective study to see what changed.

Radim

0 Likes
1 Solution
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @ravo ,

This code example was developed using the 1.6.0 version of the HAL library. Hence updating the same to 2.X, which is a major version change compared to 1.X, will create significant errors. If you are adamant in using the 2.X version of the library, then you will have to edit the source files of the CE accordingly to adapt to the 2.X version of the library. We are currently in planning for revising the code example for the latest 2.X version of the library but the same will require some time.

You can simply google for the library to get the release notes for the same as all libraries are publicly available in the Infineon GitHub page.  Please refer this link for mtb-hal-cat1 library.

Warm Regards
Alen

View solution in original post

0 Likes
2 Replies
AlenAn14
Moderator
Moderator
Moderator
500 replies posted 100 solutions authored 250 replies posted

Hi @ravo ,

This code example was developed using the 1.6.0 version of the HAL library. Hence updating the same to 2.X, which is a major version change compared to 1.X, will create significant errors. If you are adamant in using the 2.X version of the library, then you will have to edit the source files of the CE accordingly to adapt to the 2.X version of the library. We are currently in planning for revising the code example for the latest 2.X version of the library but the same will require some time.

You can simply google for the library to get the release notes for the same as all libraries are publicly available in the Infineon GitHub page.  Please refer this link for mtb-hal-cat1 library.

Warm Regards
Alen

0 Likes
ravo
Level 5
Level 5
10 likes received 5 comments on blog 5 solutions authored

Dear Alen,

thanks for quick response. I can stay on 1.6.0 version.

When I study and modify demo project PSoC 6 MCU: USB Audio Device (FreeRTOS) on CY8CPROTO-062 kit than I have found some issue that I am not able to speed CM4 core to 100 MHz with audio. This behaviour I tried describe in another thread https://community.infineon.com/t5/PSoC-6/CY8CPROTO-062-4343W-USB-Audio-Device-FreeRTOS-demo/m-p/3461...
Maybe you can help me.

When I have thees problems then I try to elaborate where could be problems and I have been seen outdated BSP an libraries... but maybe I should stay on older versions.

Best Regards


Radim

0 Likes