cancel
Showing results for 
Search instead for 
Did you mean: 

AHB newbie question

Scott Dev
Senior
Posted on March 01, 2018 at 15:01

Hi

  I have been away from learning the ST32 for a good while and just coming back to it. I am using the NUCLEO-L073 board (uses the STM32L073) and setting up the GPIO module. Looking into the online videos (not for this chip) it mentons setting up the AHB bus, but I cant see it in the data sheet for the GPIO. I have attached the page with the block diagram, where I can see a bus connecting them, but doesnt mention an AHB. Am I correct in thinking I simply set up the IO pins and there isnt a bus to setup, or am I missing something?

Many Thanks

Scott

8 REPLIES 8
Posted on March 01, 2018 at 15:40

Different chips implement different connectivity. Some chips use APB other AHB. Here it is diagrammed more directly connected. You should probably look at the addresses the GPIO sit in, and the APB1ENR, APB2ENR or AHBENR their clock is enabled on.

They may have implemented the GPIO as TCM to gain some additional speed, the CM0 is a bit of a sloth, and people tend to do a GPIO toggle benchmark to gauge speed, and the bus interactions likely cost 4-cycles, and more direct connectivity could likely reduce that.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Nesrine M_O
Lead II
Posted on March 01, 2018 at 15:41

Hi

devlin.scott

,

The STM32L0 features a new I/O interface (IOPORT) which allows single cycle accesses and so faster operations on I/O ports.

0690X00000609rwQAA.png

-Nesrine-

AvaTar
Lead
Posted on March 01, 2018 at 15:54

Am I correct in thinking I simply set up the IO pins and there isnt a bus to setup, or am I missing something?

To add to the previous answers - no, nothing to do to setup a bus.

The wiring is fixed anyway, i.e. which peripheral is connected to which bus on a certain MCU variant.

The bus comes into play when you e.g. want to initialize the clock to the peripheral, by selecting the proper RCC register which are responsible for different busses.

Posted on March 02, 2018 at 00:30

Looking into the online videos (not for this chip) it mentons setting up the AHB bus,

Which videos?

JW

Posted on March 02, 2018 at 10:40

Thanks Clive

Posted on March 02, 2018 at 10:42

Hi Nesrine

Thanks for that, that makes sense

Scott

Posted on March 02, 2018 at 10:44

Hi,

 

https://www.youtube.com/watch?v=FPfTxNS9NvQ&t=611s

 

Scott

Posted on March 02, 2018 at 21:35

There's general setup of the clocks there, nothing GPIO-specific (at least within 10 seconds +- of the spot you've given; I don't have time to waste looking at videos).

JW