Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Recent content by Xenon02

  1. X

    UART and receving more than it is expected.

    Hello ! I've wanted to ask a bit how RX UART works like when I want to receive more than I want. I've had a bluetooth HC-06 and tested it on STM32-NucleoL073RZ, the thing is that I've sent a command via HAL_UART_Transmit(), and the command is "AT\r\n", I've sent it and it sends back a message...
  2. X

    Adding timer for digital clock.

    I have grasped the idea that the operation works in registers and the variables can be stored in SRAM or other places like you've said, same goes to registers context (value that they had initially). Mostly is as I see from many websites I read identical (like operations in registers etc.), the...
  3. X

    Adding timer for digital clock.

    Yup it is clear after many examples more of the pseudo code examples I got it. Post#42 was very helpfull. Have a nice day. O okey I thought that maybe you knew how it would look like using breakpoints in debugging etc ;D Maybe someone else have more experience in it.
  4. X

    Adding timer for digital clock.

    Yea I understood that the C and debugger are not at the register level so I tried to nibble the information what I will see in the debugging process. Like you said the registers stays intact which doesn't change the value, the memory variable will change though through ISR. So I thought that...
  5. X

    Adding timer for digital clock.

    So I understand that what I said before "So like two different "A" which is a variable name now and not register name." is correct. Or rather what I said before PS is correct. This PS was rather a thing I have found and from this quote I thought like wait two different variable A. Weird ;D So I...
  6. X

    Adding timer for digital clock.

    A okey, So basically all variables are saved in SRAM/memory and registers just takes the variables value from memory and saves in registers for calculation etc. *So when ISR takes these registers value saves them in SRAM and makes calculations like m = m + 1 or m++; in those registers...
  7. X

    Adding timer for digital clock.

    It goes into ISR copies the value of register A that is 0 uses this variable to be updated to, it modifies the register A which is now 1 and then restores the value from this register A which is again 0. Or rather it uses A stores the new data in different register like B and never updates the...
  8. X

    Adding timer for digital clock.

    PS. Maybe I understood it ? So the debugger will see that the value of A was changed from 0 to 1, but when it exits the ISR and goes back to main or rather inside of while it compares the old A value which is after the label in the assembler. So exiting ISR will land me back inside the label...
  9. X

    Adding timer for digital clock.

    Then how it will look like in the debugging ? I am confused in this point. This is the point what does it mean ISR saves the context at the start and restore it at the end ? Like okey he sees the value saves it and restore it at the end of ISR ? I don't see why therefore the A is not...
  10. X

    Adding timer for digital clock.

    I don't get it. Then if debugger does the same as the code, he jumps to ISR, the A variable is updated, and comes back to the main function and the Variable A i reseted to 1 it goes to the while function and compares again 1 == 1 ? As if the A is restarted which would take another step to...
  11. X

    Adding timer for digital clock.

    So I was partly right I guess ? Because this is how I could detect an error I guess. That the debugger will point at while in which says A == 1 but A = 2 so and it still executes the while, so the debugger will go into while loop instead of skipping it. Because debugger will show the real values...
  12. X

    Adding timer for digital clock.

    I have used copilot as well to understand this topic. Because I was just shocked that I've added the breakpoint inside the ISR function I see the variable updated and nothing crashed, and everything worked well. Copilot said that it can optimize the code in a way that the debugger will show...
  13. X

    Adding timer for digital clock.

    I also compared this sum in my example with the ISR function in post#20. So I thought that if the ISR was called (I know no one would do it normally to use ISR function in the main it is just an example), then it would be still optimized even though It was used in main just like Sum()...
  14. X

    Adding timer for digital clock.

    Although I wonder if for simple programs it works similarly. If I had Main() { a= 3 b= 2 S = Sum(a,b); Return 0; } The program is optimized and I ignores the function and sets S to always be 5. I mean this wondering comes when I usually give a breakpoint because it shows that the...
  15. X

    Adding timer for digital clock.

    So basically even though the program jumped into ISR and changed the A value the main program won't know it without volatile because the compiler optimized the code ? It is a bit hard to believe because putting a breakpoint there shows that it sees this change but then at the same time it...

Part and Inventory Search

Back
Top