Skip to main content
shides2
Associate II
January 30, 2016
Question

What is RCC_AHB1RSTR register for?

  • January 30, 2016
  • 15 replies
  • 2557 views
Posted on January 30, 2016 at 10:35

The architectures of Cortex-M4 and Cortex-M7 include RCC_AHB1RSTR register. What is it for? When I use this register for resetting AHB1 bus for any of GPIO ports these ports stop working irrevocably.

Thanks in advance!

#arm-cortex-m4-cortex-m7-register
    This topic has been closed for replies.

    15 replies

    mark239955_stm1
    Visitor II
    January 30, 2016
    Posted on January 30, 2016 at 12:15

    After setting bits in AHB1RSTR, do you clear them?  Failing to clear them will cause the flagged peripherals to be held in reset, resulting in the behaviour that you describe.

    shides2
    shides2Author
    Associate II
    January 30, 2016
    Posted on January 30, 2016 at 15:49

    After setting these bits I clear them, sure. But ports don't still work. I need to react to the rising of external signal on GPIO. At the moment the reaction from GPIO takes unpredictable number of ticks. I need the equal number of ticks in reaction to the rising of signal in my procedure.  

    Thank you for reply!

    Tesla DeLorean
    Guru
    January 30, 2016
    Posted on January 30, 2016 at 17:29

    After you reset the peripherals you will have to reprogram them. If you reset GPIOA, you'll have to reconfigure all the pins and settings.

    May be you can show the code so we don't have to guess at what you are doing.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    January 30, 2016
    Posted on January 30, 2016 at 17:34

    You need to use AHB1RSTR why exactly? It makes no sense.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    waclawek.jan
    Super User
    January 30, 2016
    Posted on January 30, 2016 at 20:50

    > I need to react to the rising of external signal on GPIO. At the moment the reaction from GPIO takes unpredictable number of ticks.

    What do you mean by ''reaction from GPIO''?

    JW

    shides2
    shides2Author
    Associate II
    January 30, 2016
    Posted on January 30, 2016 at 22:27

    I need a part of my program to be executed synchronously with a rising of signal comes to GPIO. For instance, if I use an external interrupt it takes an unpredictable time to go into the interrupt. Also, using foxy assembler's insertions doesn't let to catch the rising of signal. My target is following. I need to call the procedure in which a part of code has to be executed synchronously with the rising of signal of input GPIO. The reaction to the rising of input signal can be lingering but I need it to be the same every time. 

    shides2
    shides2Author
    Associate II
    January 31, 2016
    Posted on January 31, 2016 at 12:41

    I wanted to use this register in hope that it helped to eliminate the unpredictable number of ticks. Thank you for your answers! I'd be glad to hear any ideas!

    Radosław
    Associate II
    January 31, 2016
    Posted on January 31, 2016 at 16:33

    Back to earth.

    This register will never help you.

    What genetere your signal? show as interrupt handler.

    Innterrupt colling in MCU as STM32 is always constant.

    You thinking wrong.

    shides2
    shides2Author
    Associate II
    January 31, 2016
    Posted on January 31, 2016 at 17:00

    Yes, it seems this register can't help me. Going into interrupt takes different number of ticks though. For example, in the interrupt handler I just toggle pin GPIO that set as output. Input and output signals aren't synchronous on an oscilloscope. Going into interrupt isn't equal to 12 ticks. Assembler's insertions also don't help in synchronization. 

    Inlet signal to GPIO is 25 MHz, MCU frequency is 200 MHz (Cortex-M7). 

    Radosław
    Associate II
    January 31, 2016
    Posted on January 31, 2016 at 18:00

    how responce time you expect? 12ticks is predicted and correct.

    Meny interrupts per 1 edge it must be some programming error on your site.