No ACL setup yet! Denying access to everyone.
en:edu:zmitac:s2:aih:lab:nrf52gpiote

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:edu:zmitac:s2:aih:lab:nrf52gpiote [2023/11/22 20:58] – ktokarzen:edu:zmitac:s2:aih:lab:nrf52gpiote [2023/12/01 13:51] (current) – ktokarz
Line 4: Line 4:
 ===== Using PPI with GPIO ===== ===== Using PPI with GPIO =====
  
-This part of the laboratory shows how to use the PPI to send the activation information from the button (sw0) directly to the LED (led0). It is possible to set up the hardware connection between the button EVENT signal and the TASK signal for LED. While the output is controlled by the GPIOTE (GPIO Tasks and Events) mechanism the normal GPIO writes have no effect. The GPIOTE mechanism is not supported in Zephyr OS, but the driver (NRFX) which is provided directly by Nordic Semiconductor can be used in Zephyr-compatible software.+This part of the laboratory shows how to use the PPI to send the activation information from the button (sw0) directly to the LED (led0). It is possible to set up the hardware connection between the button EVENT signal and the TASK signal for LED. While the output is controlled by the GPIOTE (GPIO Tasks and Events) mechanism the normal GPIO writes have no effect. The GPIOTE mechanism is not supported in Zephyr OS, but the driver (NRFX) which is provided directly by Nordic Semiconductor can be used in Zephyr-compatible software. Every connection between EVENT and TASK is done by defining the channel. The number of available channels is limited to 8.
 The example provided uses the GPIOTE to handle signalling. To make it work properly the config file must be changed, enabling the NRFX driver, and disabling the general GPIO driver: The example provided uses the GPIOTE to handle signalling. To make it work properly the config file must be changed, enabling the NRFX driver, and disabling the general GPIO driver:
 <code> <code>
Line 21: Line 21:
 CONFIG_LOG=y CONFIG_LOG=y
 </code> </code>
 +
 +===== Tasks to be done during the laboratory =====
 +
 To do this part of the laboratory take the following steps: To do this part of the laboratory take the following steps:
   - Modify the prj.conf file.    - Modify the prj.conf file. 
Line 29: Line 32:
   * CLEAR - to write the low state   * CLEAR - to write the low state
   * OUT - to specify behaviour in the configuration (set, clear or toggle).   * OUT - to specify behaviour in the configuration (set, clear or toggle).
-The example provided uses the OUT TASK with toggle configuration. In the exercise, there is no need to configure SET or CLEAR tasks, but there is a need to create separate PPI channels, one for setting LED with one button, and another for clearing it with a second button.+The example provided uses the OUT task only with toggle configuration. In the exercise, while replacing the OUT task with SET and CLEAR there is no need to configure such tasks, but there is a need to create separate PPI channels, one for setting LED with one button, and another for clearing it with a second button.
 While creating channels you can use the functions for resolving the TASK's handlers addresses: While creating channels you can use the functions for resolving the TASK's handlers addresses:
 <code> <code>
en/edu/zmitac/s2/aih/lab/nrf52gpiote.1700683131.txt.gz · Last modified: by ktokarz