4928 views|3 replies

297

Posts

0

Resources
The OP
 

[Silicon Labs BG22-EK4108A Bluetooth Development Review] 5. Bluetooth routines control additional pin PA0 [Copy link]

 

Since I am not very familiar with Bluetooth routines, I have been trying to add new functions through GATT, but I still have no idea. I also checked the evaluation requirements and it seems that today is the last day. Time flies.

By carefully analyzing the Soc_Blinky routines and referring to other E-friends' evaluation articles, I learned a lot, but I didn't go beyond the scope of the routines, such as adding another pin to control an additional LED, or adding a new button for control.

In the GATT configuration of the demo example, the LED and Button are both ready, but after adding several items, none of them are successful.

So I want to add LED methods in LED Control to control additional pins, such as PA0 (the pin led out from the outside of the board)

So first add LED1 in slcp. After adding, the system can create initialization routines by itself.

Simplicity studio will automatically add the corresponding header file sl_simple_led_led1_config.h and automatically initialize the settings in sl_simple_led_instance.c

Then, just add the corresponding value in the LED control in Bluetooth to complete the control of the PA0 pin.

Modify some codes in app.c to control the PA0 pin.

Since I don't have an LED, I use a multimeter to measure the voltage of PA0. The test results are as follows

Send 0, LED0 turns off

Send value 1, LED0 lights up, PA4 outputs high level

Send value 2, PA0 outputs low level

Send value 3, PA0 output high level, 3.3V

The extra pin PA0 is successfully controlled via Bluetooth. For other pins, just add an Instance in slcp to achieve it.

This is the final review of the 4108 board.

image.png (76.32 KB, downloads: 0)

image.png

Latest reply

I have never understood the Bluetooth protocol, and of course, I have never studied it in detail.   Details Published on 2022-2-17 21:39
 
 

6593

Posts

0

Resources
2
 

The method of adding LEDs in LED Control to control additional pins is still feasible.

 
 
 

6787

Posts

2

Resources
3
 

Graphical configuration is much simpler than code configuration, but the underlying knowledge still needs to be understood!

 
 
 

7462

Posts

2

Resources
4
 

I have never understood the Bluetooth protocol, and of course, I have never studied it in detail.

Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list