Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Clock gating EFM32LG230 for PA15 PE15 pins blinking LED

yefj

Advanced Member level 4
Joined
Sep 12, 2019
Messages
105
Helped
0
Reputation
0
Reaction score
0
Trophy points
16
Activity points
775
Hello, i am trying to blink LED's which are connected to PA15 PE15 on my controller, as shown in the diagram bellow.
I have tried to look in the data sheet and reference manual for their memory locations and also for the clock gating address which enables the options for controlling PA15 PE15 , from the links bellow.
As shown in the tables bellow, i found that GPIO goes from 0X40007000 -0X40006000
but i coudnt find what addersess are relevant for PA15 PE15 and what clock gating addreses are relevant for enabling PA15 PE15.
please help.
Thanks.
https://www.silabs.com/documents/public/reference-manuals/EFM32LG-RM.pdf
https://www.silabs.com/documents/public/data-sheets/efm32lg-datasheet.pdf

1.JPG
2.JPG3.JPG
 
Last edited:

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
17,435
Helped
3,938
Reputation
7,874
Reaction score
3,811
Trophy points
113
Activity points
115,599
Hi,

You should be able to set port direction, port drive mode, and port output leves directly.

No need to go the bit_banding way.

Please tell us what compiler and IDE you use.
Show us your code.
Tell us how you verify proper programming and proper microcontroller function at all.

Klaus
 

yefj

Advanced Member level 4
Joined
Sep 12, 2019
Messages
105
Helped
0
Reputation
0
Reaction score
0
Trophy points
16
Activity points
775
Hello Clause, I intend to use Simplisity studio with the code shown bellow.
If i did the port connection correctly for given my efm32lg230 controller.
How to do the blinking , i know that i should some how put a delay because if it blinks to fast then i wont able to see the blinking effect at all.
Thanks.


Code:
#include "em_device.h" 
#include "em_cmu.h" 
#include "em_gpio.h"
 #include "em_chip.h" 
 #define LED_PORT_E    gpioPortE 
 #define LED_PIN     15  
#define LED_PORT_A    gpioPortA 
 #define LED_PIN     15
   
int main(void)
 {
    CHIP_Init(); 
     while(1);
}
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
17,435
Helped
3,938
Reputation
7,874
Reaction score
3,811
Trophy points
113
Activity points
115,599
Hi,

Pseudo code:
Loop(
LED ON
DELAY_MS 500
LED OFF
DELAY_MS 500
)

I bet you can find similar code thousand times in the internet

Klaus
 
  • Like
Reactions: yefj

    yefj

    points: 2
    Helpful Answer Positive Rating
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top