Skip to main content
HEhat.1
Associate II
Oct 2, 2020 6:58 AM UTC
Solved

Cannot initialize ADC1 in STM32G071RB on EWARM

I'm debugging STM32G071RB by using Nucle-G071.

The code I use is generated by STM32CubeMX, and I try to put break point to variable in "static void MX_ADC1_Init" but it semms like not to initialize because I cannot put break point there.

I confirmed that sample code in L0 is fine without any trouble.

I only generated initial code and never write user code.

Does anyone find this problem before?

If you have any advice please teach me, thank you.

This topic has been closed for replies.
HEhat.1
HEhat.1Best answer
Associate II
Oct 21, 2020 10:45 AM UTC

Hi Nesrine.JLASSI (ST Employee)

Thanks for your comment.

I have already figured this out.

This problem is coming from setting of develop environment (EWARM).

"Optimization level" was in the highest level. This is why I could not put break point.

​

Thank for your cooperation

Best regards,

Hayato EHATA

2 replies

Nesrine.JLASSI
Visitor II
Oct 21, 2020 10:25 AM UTC

Hi @HEhat.1​ 

Thanks for the feedback, i did the same scenario and i had no issue. So, could you please share your .ioc file to check with.

Best regards,

Nesrine

HEhat.1
HEhat.1AuthorBest answer
Associate II
Oct 21, 2020 10:45 AM UTC

Hi Nesrine.JLASSI (ST Employee)

Thanks for your comment.

I have already figured this out.

This problem is coming from setting of develop environment (EWARM).

"Optimization level" was in the highest level. This is why I could not put break point.

​

Thank for your cooperation

Best regards,

Hayato EHATA