Skip to main content
mrsmile
Associate III
June 10, 2023
Solved

UART_DMA CODE Generates for STM32 CubeMx

  • June 10, 2023
  • 6 replies
  • 3473 views

Hi @RomainR.​ sir,

As i already posted a query regarding UART DMA using STM32G030K6T6 controller, you have corrected my code it worked well. when i generated a new project and i followed the step to have provided me but it doesn't work it get stuck in error handler. Can you please explain me the process you have done. I Add new project configuration pictures. If i made a mistake please correct me sir.

    This topic has been closed for replies.
    Best answer by mrsmile

    Problem solved.

    6 replies

    RomainR.
    ST Employee
    June 12, 2023

    Hello @mrsmile (Community Member)

    I just generated a STM32CubeMx project for STM32G030K6T6 device.

    I cannot find a diagnosis for the Hardfault with the little information you provide.

    Can you design and run a simple project with CubeMX without DMA and without UART which is functional (a simple GPIO toggle)?

    If so, you need to debug your program to find which line of your code generates a Hardfault.

    On a Cortex M0+ the fault status registers are not available so it is a bit more difficult and involves inspecting only the stacked registers with the debugger (r0-r3, r13, LR and PC values)

    BR

    romain,

    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.
    mrsmile
    mrsmileAuthor
    Associate III
    June 12, 2023

    ok sir, sir your checking DMA circular mode or Normal mode.

    mrsmile
    mrsmileAuthor
    Associate III
    June 12, 2023

    i just generate DMA Normal mode with same code. output is comes properly for 500 msec once.but circular mode with same code does not worked well sir(its Stuck Error Handler).

    RomainR.
    ST Employee
    June 12, 2023

    Hello @mrsmile (Community Member)

    Use DMA in Normal mode.

    Regards,

    Romain,

    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.
    mrsmile
    mrsmileAuthor
    Associate III
    June 13, 2023

    ok sir, Thank you so much your valuable time spend with me. Thank you sir......!