cancel
Showing results for 
Search instead for 
Did you mean: 

SNK1M1 board project with azure threadX not working

ABasi.2
Associate III

hello!

i'm trying to make a project with the board SNK1M1 coupled with the NUCLEO-G071RB using azure ThreadX instead of FreeRTOS.

i'm able to replicate the example provided here:

https://wiki.st.com/stm32mcu/wiki/STM32StepByStep:Getting_started_with_USB-Power_Delivery_Sink#Configure_UCPD_monitor_firmware_responder_for_debug

or the video on youtube:

https://www.youtube.com/watch?v=cbdFHmMOMwk

and all work fine like in the video

BUT

if i change the Rtos with azure ThreadX nothing work anymore!

the code is compiled without problem, it seems to run (no hardfault error) but i can't find the board in the cube monitor UCPD

 

there is some additional step to use azure threadX instead FreeRTOS?

there is a tutorial of how to use with threadX?

 

thank you in advance!

 

 

 

17 REPLIES 17
FBL
ST Employee

Hi @ABasi.2 

I suggest you refer to this example to create a thread and tonsure that all necessary ThreadX components are included. Check memory management generation for UCPD in app_azure_rtos.c. If still having issues, don't hesitate to share your project via Github link.

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

ABasi.2
Associate III

hello FBL

 

i see your example, but i think is a gerneric example about threadX, not a specific example about UCPD with threadX

i cheked the memory menagement generationin app_azure_rtos.c and i think its ok

 

from app_azure_rtos.c and app_azure_rtos_config.h we have

#define USBPD_APP_MEM_POOL_SIZE 6144

static UCHAR usbpd_byte_pool_buffer[USBPD_APP_MEM_POOL_SIZE];
static TX_BYTE_POOL usbpd_app_byte_pool;

tx_byte_pool_create(&usbpd_app_byte_pool, "USBPD App memory pool", usbpd_byte_pool_buffer, USBPD_APP_MEM_POOL_SIZE)

 

the fact is that i have a perfectly functioning project with FreeRtos, i swap Rtos via Cube MX and noting work anymore

 

i have also tried of course to make a new fresh project with threadX but same result.. nothing work

 

ST have a functioning example of  SNK1M1 board  using threadX? like the example provided with freeRtos

 

thank you

 

Nicolas P.
ST Employee

Hello @ABasi.2 

Have a look at all published examples on the USBPD wiki here.

You will see that STM32H5 and STM32U5 have ThreadX USB and power delivery examples.

Regards,

Nicolas.

 

(Edit : link corrected)

FBL
ST Employee

Hi @ABasi.2 

Unfortunately, we don't provide direct example for your case!

Did you check USBPD_THREADX symbol to enable in ThreadX support for CubeMonitor API?

FBL_0-1730886959161.png

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hello Nicolas

 

thank you for your answer

but the link point to this page, if i click on the link a duplicate of this page is opened

 

thank you

ABasi.2
Associate III

hello FBL

 

actually no!

 

but i'mconfused, where is the page you are showing to me?

 

is in cube ide or cube monitor ucpd?

 

thank you

 

 

 

Hello @ABasi.2 

You are right, link was wrong. I corrected: Wiki.

Direct link to sink application with Threadx here.

Regards,

Nicolas

Nicolas P.
ST Employee

Hello @ABasi.2 

Can you check quickly how much you have for TX_TIMER_TICKS_PER_SECOND in your tx_user.h ?

You should have :  #define TX_TIMER_TICKS_PER_SECOND                1000

(Similar example on H5 here)

Do you see the systick counter updates ?

Check this wiki : is USBPD_DPM_TimerCounter(); called ?

Regards,

Nicolas

hello @Nicolas P. 

i have 100 !

 

is this the problem?

i have searched the 

USBPD_DPM_TimerCounter()

 

is defined in usbpd_dpm_core.h but is never called in the code!

 

where have to be called?

 it is supposed to be called frome "cubemx code" or by the user?

 

also can you clarify to me where is the  USBPD_THREADX symbol enabled? i didn't recognize the page posted by FBL

 

thank you!