Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: sdp_k1_sdram
app_config_mbed.h
00001 /***************************************************************************//** 00002 * @file app_config_mbed.h 00003 * @brief Header file for Mbed platform configurations 00004 ******************************************************************************** 00005 * Copyright (c) 2021-22 Analog Devices, Inc. 00006 * All rights reserved. 00007 * 00008 * This software is proprietary to Analog Devices, Inc. and its licensors. 00009 * By using this software you agree to the terms of the associated 00010 * Analog Devices Software License Agreement. 00011 *******************************************************************************/ 00012 00013 #ifndef APP_CONFIG_MBED_H_ 00014 #define APP_CONFIG_MBED_H_ 00015 00016 /******************************************************************************/ 00017 /***************************** Include Files **********************************/ 00018 /******************************************************************************/ 00019 00020 #include <stdint.h> 00021 #include <PinNames.h> 00022 00023 #include "mbed_uart.h" 00024 #include "mbed_irq.h" 00025 #include "mbed_spi.h" 00026 #include "mbed_pwm.h" 00027 #include "mbed_gpio.h" 00028 00029 #if defined(TARGET_SDP_K1) 00030 #include "sdram_sdpk1.h" 00031 #endif 00032 00033 /******************************************************************************/ 00034 /********************** Macros and Constants Definition ***********************/ 00035 /******************************************************************************/ 00036 00037 /* Pin mapping of SDP-K1 w.r.t Arduino connector */ 00038 #define SPI_CSB ARDUINO_UNO_D10 00039 #define SPI_HOST_SDO ARDUINO_UNO_D11 00040 #define SPI_HOST_SDI ARDUINO_UNO_D12 00041 #define SPI_SCK ARDUINO_UNO_D13 00042 00043 /* Pins used to trigger and/or read a new (periodic) conversion event */ 00044 #define PWM_TRIGGER ARDUINO_UNO_D3 00045 #define INT_EVENT ARDUINO_UNO_D3 00046 00047 /* Common pin mapping on SDP-K1 */ 00048 #define UART_TX CONSOLE_TX 00049 #define UART_RX CONSOLE_RX 00050 #define LED_GPO LED3 00051 00052 /* Define the max possible sampling (or output data) rate for a given platform. 00053 * This is also used to find the time period to trigger a periodic conversion event. 00054 * Note: Max possible ODR is 62.5KSPS per channel for continuous data capture on 00055 * IIO client. This is derived by testing the firmware on SDP-K1 controller board 00056 * @22Mhz SPI clock. The max possible ODR can vary from board to board and 00057 * data continuity is not guaranteed above this ODR on IIO oscilloscope */ 00058 #define SAMPLING_RATE (62500) 00059 #define CONV_TRIGGER_PERIOD_NSEC (((float)(1.0 / SAMPLING_RATE) * 1000000) * 1000) 00060 #define CONV_TRIGGER_DUTY_CYCLE_NSEC (CONV_TRIGGER_PERIOD_NSEC / 2) 00061 00062 /******************************************************************************/ 00063 /********************** Public/Extern Declarations ****************************/ 00064 /******************************************************************************/ 00065 00066 extern struct mbed_irq_init_param mbed_ext_int_extra_init_params; 00067 extern struct mbed_pwm_init_param mbed_pwm_extra_init_params; 00068 extern struct mbed_uart_init_param mbed_uart_extra_init_params; 00069 extern struct mbed_spi_init_param mbed_spi_extra_init_params; 00070 00071 #endif /* APP_CONFIG_MBED_H_ */
Generated on Thu Jul 21 2022 11:15:40 by
 1.7.2