Skip to content

Commit

Permalink
Third Party Hardware Drivers Extension v1.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
silabs-DanielN authored Oct 12, 2023
1 parent 3ce5007 commit 0fec426
Show file tree
Hide file tree
Showing 172 changed files with 13,721 additions and 100 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Third Party Hardware Drivers #

[![Version Badge](https://img.shields.io/badge/-v1.8.0-green)](https://github.com/SiliconLabs/third_party_hw_drivers_extension/releases)
[![Version Badge](https://img.shields.io/badge/-v1.9.0-green)](https://github.com/SiliconLabs/third_party_hw_drivers_extension/releases)
[![GSDK Badge](https://img.shields.io/badge/GSDK-v4.3.1-green)](https://github.com/SiliconLabs/gecko_sdk/releases)
![License badge](https://img.shields.io/badge/License-Zlib-green)

Expand Down Expand Up @@ -80,6 +80,9 @@ A full list of all drivers in this repository is defined below:
| bthome_v2_server | [Click Here](./driver/public/silabs/bthome_v2_server) | [Click Here](./app/example/bthome_v2_server) | [Click Here](./app/documentation/example/bthome_v2_server) |
| services_enocean_switch_proxy_server | [Click Here](./driver/public/silabs/services_enocean_switch_proxy_server) | N/A | N/A |
| services_lin_bus_slave | [Click Here](./driver/public/silabs/services_lin_bus_slave) | [Click Here](./app/example/silabs_lin_bus) | [Click Here](./app/documentation/example/silabs_lin_bus) |
| obdii_stn1110 | [Click Here](./driver/public/mikroe/obdii_stn1110) | [Click Here](./app/example/mikroe_obdii_stn1110) | [Click Here](./app/documentation/example/mikroe_obdii_stn1110) |
| thunder_as3935 | [Click Here](./driver/public/mikroe/thunder_as3935) | [Click Here](./app/example/mikroe_thunder_as3935) | [Click Here](./app/documentation/example/mikroe_thunder_as3935) |



## Requirements ##
Expand Down
87 changes: 87 additions & 0 deletions app/documentation/example/mikroe_obdii_stn1110/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# STN1110 - OBDII Click (Mikroe) #

## Summary ##

This example project shows an example for Mikroe OBDII Click board driver integration with Silicon Labs Platform.

The OBDII Click can be used for the communication with the Electronic Control Unit (ECU) of a vehicle, via several different OBD II diagnostic protocols such as CAN, K LINE, L LINE and J1850. The STN1110 IC is used to process requests sent by the MCU via the UART interface and return back the responses from the ECU network nodes.

## Required Hardware ##

- [**EFR32xG24-EK2703A** EFR32xG24 Explorer Kit](https://www.silabs.com/development-tools/wireless/efr32xg24-explorer-kit?tab=overview).
- [**OBDII Click** board](https://www.mikroe.com/obdii-click).
- [OBDII cable](https://www.mikroe.com/obd-ii-to-db9-cable).

## Hardware Connection ##

The OBDII Click supports MikroBus, so it can connect easily to EFR32xG24 Explorer Kit's MikroBus header. Be sure that the board's 45-degree corner matches the Explorer Kit's 45-degree white line.

The hardware connection is shown in the image below:

![board](image/hardware_connection.png)

## Setup ##

You can either create a project based on an example project or start with an empty example project.

### Create a project based on an example project ###

1. From the Launcher Home, add the BRD2703A to My Products, click on it, and click on the **EXAMPLE PROJECTS & DEMOS** tab. Find the example project with filter **obdii**.
2. Click **Create** button on the **Third Party Hardware Drivers - STN1110 - OBDII Click (Mikroe)** example. Example project creation dialog pops up -> click Create and Finish and Project should be generated.

![Create_example](image/create_example.png)

### Start with an empty example project ###

1. Create an "Empty C Project" for the "EFR32xG24 Explorer Kit Board" using Simplicity Studio v5. Use the default project settings.

2. Copy the file `app/example/mikroe_obdii_stn1110/app.c` into the project root folder (overwriting existing file).

3. Install the software components:

- Open the .slcp file in the project.

- Select the SOFTWARE COMPONENTS tab.

- Install the following components:

- [Services][Timers][Sleep Timer]
- [Services][IO Stream][IO Stream: EUSART] → default instance name: **vcom**
- [Services][IO Stream][IO Stream: USART] → default instance name: **mikroe**
- [Third Party Hardware Drivers][Interface][STN1110 - OBDII Click (Mikroe)] → use default configuration

| Mikroe pin | BRD2703A pin |
|:----------|:------------------:|
| STN1110_RESET | PC8 |
| STN1110_INT | PB1 |

- [Application][Utility][Assert]
- [Application][Utility][Log]

4. Build and flash this example to the board.

**Note :**

- Make sure that the SDK extension already be installed. If not please follow [this documentation](https://github.com/SiliconLabs/third_party_hw_drivers_extension/blob/master/README.md#how-to-add-to-simplicity-studio-ide).

- SDK Extension must be enabled for the project to install "STN1110 - OBDII Click (Mikroe)" component.

## How It Works ##

### Driver Layer Diagram ###

![software layer](image/sw_layers.png)

### Testing ###

This example demonstrates the use of OBDII click board by reading the engine RPM and vehicle speed and displaying results on the USB UART once per second.

You can launch Console that's integrated into Simplicity Studio or use a third-party terminal tool like TeraTerm to receive the data from the USB. A screenshot of the console output is shown in the figure below.

![logging_screen](image/log.png)

## Report Bugs & Get Support ##

To report bugs in the Application Examples projects, please create a new "Issue" in the "Issues" section of [third_party_hw_drivers_extension](https://github.com/SiliconLabs/third_party_hw_drivers_extension) repo. Please reference the board, project, and source files associated with the bug, and reference line numbers. If you are proposing a fix, also include information on the proposed fix. Since these examples are provided as-is, there is no guarantee that these examples will be updated to fix these issues.

Questions and comments related to these examples should be made by creating a new "Issue" in the "Issues" section of [third_party_hw_drivers_extension](https://github.com/SiliconLabs/third_party_hw_drivers_extension) repo.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 102 additions & 0 deletions app/documentation/example/mikroe_rng/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# RNG Click (Mikroe) #

## Summary ##

This project shows the driver implementation of a random number generator (RNG) using the ADS1115 - 16 bit sigma-delta ADC IC with the Silicon Labs Platform.

RNG Click (random number generator) is a device that generates a sequence of numbers or symbols that cannot be reasonably predicted better than by a random chance. This Click board™ is true hardware random-number generator (HRNG), which generate genuinely random numbers. Random number generators have applications in gambling, statistical sampling, computer simulation, cryptography, completely randomized design, and various other areas.

RNG Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.

![rng_click](image/rng_click.png)

In computing, a hardware random number generator (HRNG) or true random number generator (TRNG) is a device that generates random numbers from a physical process, rather than by means of an algorithm. Such devices are often based on microscopic phenomena that generate low-level, statistically random "noise" signals, which is the case in this Click board™. That process is, in theory, completely unpredictable, and the theory's assertions of unpredictability are subject to experimental test. This is in contrast to the paradigm of pseudo-random number generation, which is commonly implemented by the software.

![rng_click_details](image/rng_click_details.png)

The heart of the RNG click is the avalanche noise generated from an internal diode of the transistor Q1 (BC846B). Avalanche breakdown is a phenomenon that can occur in both insulating and semiconducting materials. It is a form of electric current multiplication that can allow very large currents within materials which are otherwise good insulators. The avalanche process occurs when carriers in the transition region are accelerated by the electric field to energies sufficient to create mobile or free electron-hole pairs via collisions with bound electrons. In order to achieve that, RNG click has also boost converter onboard, which is based on TPS61041, from Texas Instruments, and it creates the +18V power supply for the job.

The noise signal, created by the transistors Q1 and Q2 is then amplified with Q3, voltage-limited using the Zener diode and digitalized using the NC7S14M5X inverter, from Fairchild Semiconductor. After that, the string of random ones and zeros is achieved, which is brought to the ADS1115 - 16 bit sigma-delta ADC, from Texas Instruments. The potentiometer P1 is used to set as near as possible distribution of ones and zeros, which is indicated by the LD2 and LD3 LED diodes. The potentiometer P1 should be set in a way that the LD2 and LD3 diodes illuminate as equally as possible. That way, when the single-shot measurement is performed using the ADS1115, over the I2C protocol, the true, 16-bit random number is obtained.

This Click Board™ uses I2C communication interface. It is designed to be operated only with 3.3V logic levels. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with logic levels of 5V.

![rng_driver_layer](image/driver_layer.png)

## Required Hardware ##

- [**XG24-EK2703A** EFR32xG24 Explorer Kit](https://www.silabs.com/development-tools/wireless/efr32xg24-explorer-kit?tab=overview)

- [**RNG Click**](https://www.mikroe.com/rng-click)

**NOTE:**
Tested boards for working with this example:

| Board ID | Description |
| ---------------------- | ------ |
| BRD2703A | [EFR32xG24 Explorer Kit - XG24-EK2703A](https://www.silabs.com/development-tools/wireless/efr32xg24-explorer-kit?tab=overview) |
| BRD4314A | [BGM220 Bluetooth Module Explorer Kit - BGM220-EK4314A](https://www.silabs.com/development-tools/wireless/bluetooth/bgm220-explorer-kit?tab=overview) |
| BRD4108A | [EFR32BG22 Explorer Kit Board](https://www.silabs.com/development-tools/wireless/bluetooth/bg22-explorer-kit?tab=overview) |

## Hardware Connection ##

The RNG Click board supports MikroBus, so it can connect easily to EFR32xG24 Explorer Kit's MikroBus header. Be sure that the 45-degree corner of the Click Board™ matches the 45-degree white line of the Silicon Labs Explorer Kit.

The hardware connection is shown in the image below:

![board](image/hardware_connection.png)

## Setup ##

You can either create a project based on an example project or start with an empty example project.

### Create a project based on an example project ###

1. From the Launcher Home, add the BRD2703A to My Products, click on it, and click on the **EXAMPLE PROJECTS & DEMOS** tab. Find the example project with the filter "rng".

2. Click **Create** button on the **Third Party Hardware Drivers - RNG Click (Mikroe)** example. Example project creation dialog pops up -> click Create and Finish and Project should be generated.
![Create_example](image/create_example.png)

3. Build and flash this example to the board.

### Start with an empty example project ###

1. Create an "Empty C Project" for the "EFR32xG24 Explorer Kit Board" using Simplicity Studio v5. Use the default project settings.

2. Copy the file 'app/example/mikroe_rng/app.c' into the project root folder (overwriting the existing file).

3. Install the software components:

- Open the .slcp file in the project.

- Select the SOFTWARE COMPONENTS tab.

- Install the following components:

- [Services][Timers][Sleep Timer]
- [Services][IO Stream][IO Stream: USART] → default instance name: vcom
- [Application][Utility][Log]
- [Third Party Hardware Drivers][Miscellaneous][RNG Click (Mikroe)]

4. Build and flash this example to the board.

**Note:**

- Make sure that the SDK extension already be installed. If not please follow [this documentation](https://github.com/SiliconLabs/third_party_hw_drivers_extension/blob/master/README.md#how-to-add-to-simplicity-studio-ide).

- Third-party Drivers Extension must be enabled for the project to install "RNG Click (Mikroe)" component.

## How It Works ##

After you flashed the code to the Explorer Kit and powered the connected boards, the application starts running automatically. Use Putty/Tera Term (or another program) to read the values of the serial output. Note that the EFR32xG24 Explorer Kit board uses the default baud rate of 115200.

In the below image, you can see an example of how the output is displayed. The main program reads the raw ADC value from the sensor.

There is a periodic timer in the code, which determines the sampling intervals; the default sensor sampling rate is 500 ms. If you need more frequent sampling, it is possible to change the corresponding timer value of the "app.c" file.

![logging_screen](image/log.png)

## Report Bugs & Get Support ##

To report bugs in the Application Examples projects, please create a new "Issue" in the "Issues" section of [third_party_hw_drivers_extension](https://github.com/SiliconLabs/third_party_hw_drivers_extension) repo. Please reference the board, project, and source files associated with the bug, and reference line numbers. If you are proposing a fix, also include information on the proposed fix. Since these examples are provided as-is, there is no guarantee that these examples will be updated to fix these issues.

Questions and comments related to these examples should be made by creating a new "Issue" in the "Issues" section of [third_party_hw_drivers_extension](https://github.com/SiliconLabs/third_party_hw_drivers_extension) repo.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions app/documentation/example/mikroe_thunder_as3935/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# AS3935 - Thunder Click (Mikroe) #

## Summary ##

This project shows the driver implementation of the Thunder Click (SPI) with the Silicon Labs Platform.

Thunder Click is a compact add-on board that detects the presence and proximity of potentially hazardous lightning activity in the vicinity. This board features the AS3935, a programmable fully integrated lightning sensor from ScioSense with a sensitive coil antenna, and the MA5532 from Coilcraft. Besides detecting potentially hazardous lightning activity, this Click board™ also provides information on the estimated distance to the center of the storm on the noise level. The AS3935 can detect lightning up to 40km away with an accuracy of 1km to the storm front with a sensitive antenna tuned to pick up lightning events in the 500kHz band. This Click board™ is suitable for weather station applications by adding lightning detection to your design to ensure you are aware of any potentially hazardous weather heading your way.

## Required Hardware ##

- [EFR32xG24 Explorer Kit](https://www.silabs.com/development-tools/wireless/efr32xg24-explorer-kit)

- [Thunder Click](https://www.mikroe.com/thunder-click)

## Hardware Connection ##

The Thunder Click board supports MikroBus, so it can connect easily to EFR32xG24 Explorer Kit. Be sure that the board's 45-degree corner matches the Explorer Kit's 45-degree white line.

The hardware connection is shown in the image below:

![board](image/hardware_connection.png)

## Setup ##

You can either create a project based on an example project or start with an empty example project.

### Create a project based on an example project ###

1. From the Launcher Home, add the BRD2703A to My Products, click on it, and click on the **EXAMPLE PROJECTS & DEMOS** tab. Find the example project with filter thunder.

2. Click **Create** button on the **Third Party Hardware Drivers - Thunder Click (Mikroe)** example. Example project creation dialog pops up -> click Create and Finish and Project should be generated.
![Create_example](image/create_example.png)

3. Build and flash this example to the board.

### Start with an empty example project ###

1. Create an "Empty C Project" for the "EFR32xG24 Explorer Kit" using Simplicity Studio v5. Use the default project settings.

2. Copy the file `app/example/mikroe_thunder_as3935/app.c` into the project root folder (overwriting the existing file).

3. Install the software components:

- Open the .slcp file in the project.

- Select the SOFTWARE COMPONENTS tab.

- Install the following components:

- [Services][Timers][Sleep Timer]
- [Services][IO Stream][IO Stream: EUSART] → default instance name: vcom
- [Application][Utility][Log]
- [Third Party Hardware Drivers][Sensors][AS3935 - Thunder Click (Mikroe)]

4. Modify the SPIDRV configuration of Mikroe instance as below.
![mikroe spi config](image/mikroe_spi_config.png)

5. Build and flash this example to the board.

**Note:**

- Make sure that the SDK extension already be installed. If not please follow [this documentation](https://github.com/SiliconLabs/third_party_hw_drivers_extension/blob/master/README.md#how-to-add-to-simplicity-studio-ide).

- Third-party Drivers Extension must be enabled for the project to install "Thunder Click (Mikroe)" component.

## How It Works ##

After you flashed the code to the Explorer Kit and powered the connected boards, the application starts running automatically. Use Putty/Tera Term (or another program) to read the values of the serial output. Note that the EFR32xG24 Explorer Kit board uses the default baud rate of 115200.

In the below image, you can see an example of how the output is displayed. The application returns the energy and the distance of the storm if lighting is detected. Otherwise, it will display "noise" or "disturber" if one of them is detected.

There is a timer in the code, which determines the sampling intervals; the default sensor sampling rate is 1 second. If you need more frequent sampling, it is possible to change the corresponding timer value of the app.c file.

![logging_screen](image/result.png)

## Report Bugs & Get Support ##

To report bugs in the Application Examples projects, please create a new "Issue" in the "Issues" section of [third_party_hw_drivers_extension](https://github.com/SiliconLabs/third_party_hw_drivers_extension) repo. Please reference the board, project, and source files associated with the bug, and reference line numbers. If you are proposing a fix, also include information on the proposed fix. Since these examples are provided as-is, there is no guarantee that these examples will be updated to fix these issues.

Questions and comments related to these examples should be made by creating a new "Issue" in the "Issues" section of [third_party_hw_drivers_extension](https://github.com/SiliconLabs/third_party_hw_drivers_extension) repo.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ define:
- name: DEBUG_EFM
sdk_extension:
- id: third_party_hw_drivers
version: 1.8.0
version: 1.9.0
other_file:
- path: ../../documentation/example/adafruit_rgb_led_is31fl3741/image/connection.png
directory: "image"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ define:

sdk_extension:
- id: third_party_hw_drivers
version: 1.8.0
version: 1.9.0

other_file:
- path: ../../documentation/example/adafruit_tft_lcd_ili9341/image/create_example.png
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ define:

sdk_extension:
- id: third_party_hw_drivers
version: 1.8.0
version: 1.9.0

other_file:
- path: ../../documentation/example/adafruit_tft_lcd_ili9341/image/create_example.png
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ define:

sdk_extension:
- id: third_party_hw_drivers
version: 1.8.0
version: 1.9.0

configuration:
- name: LV_BUFFER_MODE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ define:

sdk_extension:
- id: third_party_hw_drivers
version: 1.8.0
version: 1.9.0

configuration:
- name: LV_BUFFER_MODE
Expand Down
2 changes: 1 addition & 1 deletion app/example/bthome_v2/bthome_v2.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ define:

sdk_extension:
- id: third_party_hw_drivers
version: 1.8.0
version: 1.9.0

other_file:
- path: ../../documentation/example/bthome_v2/image/app1.png
Expand Down
2 changes: 1 addition & 1 deletion app/example/bthome_v2_server/bthome_v2_server.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ define:

sdk_extension:
- id: third_party_hw_drivers
version: 1.8.0
version: 1.9.0

other_file:
- path: ../../documentation/example/bthome_v2_server/image/connection.png
Expand Down
Loading

0 comments on commit 0fec426

Please sign in to comment.