Skip to main content
angeliran
Associate III
March 12, 2022
Question

Is not posible to use: "<",">" in stm32f0, keil v4?

  • March 12, 2022
  • 8 replies
  • 1281 views

I´m using this:

  1. void definir_polaridades (void){
  2.  
  3. if (contar_valor_1_hsync<contar_valor_2_hsync){//DEFINIR POLARIDAD DE HSYNC
  4. polaridad_hsync=5;
  5. } else {polaridad_hsync=10;}
  6.  
  7. if (contar_valor_1_vsync<contar_valor_2_vsync){//DEFINIR POLARIDAD DE VSYNC
  8. polaridad_vsync=5;
  9. } else {polaridad_vsync=10;}
  10. }

Keil don´t give any error, and compiles, but, when i check the result, it don´t take the operation.

Will I have to do without the operation?

Thx in advance!!!

This topic has been closed for replies.

8 replies

Tesla DeLorean
Guru
March 12, 2022

Likely some issue elsewhere with the variables.

Changed under interrupt?

Perhaps you can review a disassembly of the code generated by the compiler?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
angeliran
angeliranAuthor
Associate III
March 12, 2022

I use the variables in an interruption, does it have something to do with it?

angeliran
angeliranAuthor
Associate III
March 13, 2022

Ok, as you say, @Community member​ , it´s a bug in keil...

Tesla DeLorean
Guru
March 13, 2022

>> it´s a bug in keil...

Your case is not compelling.

>>I use the variables in an interruption, does it have something to do with it?

Things that should be volatile?

Optimization settings change behaviour?

Anything the pre-processor could be doing?

#defines ?

Can you look at the pre-processor output?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
angeliran
angeliranAuthor
Associate III
March 14, 2022

I don´t have a concrete answer, if, i do twice last function, it works, i always use global variables.

I use stm studio to check how the variables evolve, past the time, when i do what i say, it works.

I don´t know, how to made the pre processor output, maybe you say, what i do with stm studio?