motor-control-sdk/docs_src/docs/api_guide/examples/sdfm_examples.md
Achala Ram 422671308b am243x/am64x: SDFM: Update sdk documentation
Fixes: PINDSW-7019

Signed-off-by: Achala Ram <a-ram@ti.com>
2024-01-06 16:27:22 +05:30

3.9 KiB

ICSS %SDFM Examples

[TOC]

This page lists all the examples of ICSSG %SDFM availble in this SDK. Following sections describe the features available in each of the examples.

The ICSS %SDFM driver provides a well defined set of APIs to expose sigma delta interface.

The ICSS %SDFM examples invoke these APIs to

  • Set %SDFM channels
  • Set ACC source, NC OSR, OC OSR, Clock source & Clock inversion
  • Enable & disable threshold comparators
  • Set high and low threshold values
  • Enable Zero Cross & set Zero cross threshold value
  • configure normal current sample trigger time (time for read sample)
  • Enable & disable double update
  • Inform firmware to enable %SDFM mode
  • Configure and fast detect block
  • Enable PRU load share mode
  • Enable Phase Compensation

Once these steps are executed

  • ICSS %SDFM example waits for a interrupt (trigger by %SDFM firmware) to read sample data
  • when interrupt occurs, example reads sample data from DMEM and again comes back to waiting loop

ICSS SDFM Examples Implementation

Following section describes the flow of the examples.

\image html SDFM_EXAMPLE_FLOWCHART.png "ICSS SDFM Examples"

Important files and directory structure

Folder/Files Description
${SDK_INSTALL_PATH}/examples/current_sense/icss_sdfm_nine_channel_with_continuous_mode Application specific sources for ICSS %SDFM for continuous normal current sampling for nine channels
${SDK_INSTALL_PATH}/examples/current_sense/icss_sdfm_nine_channel_load_share_mode Application specific sources for ICSS %SDFM for trigger based normal current sampling for nine channels
${SDK_INSTALL_PATH}/examples/current_sense/icss_sdfm_three_channel_single_pru_mode Application specific sources for ICSS %SDFM for trigger based normal current sampling for three channels
${SDK_INSTALL_PATH}/examples/current_sense/icss_sdfm_three_channel_with_continuous_mode Application specific sources for ICSS %SDFM for continuous normal current sampling for three channels
${SDK_INSTALL_PATH}/examples/current_sense/icss_sdfm_three_channel_with_phase_compensation Application specific sources for ICSS %SDFM with phase compensation
${SDK_INSTALL_PATH}/examples/current_sense Common source for ICSS %SDFM applications
${SDK_INSTALL_PATH}/source/current_sense/sdfm
firmware/ Folder containing ICSS %SDFM firmware sources
driver/ ICSS %SDFM driver source
include/ Folder containing ICSS %SDFM structures and APIs declarations

Supported Combinations

\cond SOC_AM243X

Parameter Value
CPU + OS r5fss0-0 freertos
ICSSG ICSSG0
PRU PRU0
Toolchain ti-arm-clang
Board @VAR_BOARD_NAME_LOWER, @VAR_LP_BOARD_NAME_LOWER
Examples folder examples/current_sense

\endcond

ICSS SDFM Examples Description

Following are different examples for ICSS %SDFM:

Example Enabled Features Tested/Supported Features
\subpage BASIC_SDFM_EXAMPLES Trigger based Normal current, Over current detection Zero cross detection, Fast detect, Double Update
\subpage BASIC_SDFM_EXAMPLES_WITH_CONTINUOUS_NC Continuous normal current sampling Fast detect
\subpage BASIC_SDFM_EXAMPLE_WITH_PHASE_DELAY Trigger based Normal current, Phase compensation, Over current detection Fast detect, Double Update, Zero cross detection