Quantcast
Channel: Forums - Recent Threads
Viewing all 262198 articles
Browse latest View live

LAUNCHXL-CC1310: Using CC13xxware or TI-Drivers with another RTOS ?

$
0
0

Part Number:LAUNCHXL-CC1310

Hi, I would like to experiment the 6LowPan network support provided by the Riot-OS with my CC1310/CC1350 based Launchpads and custom boards.

Riot currently has an implementation for CC26xx boards but it is not working properly with my boards, so I would like to try to create my own port but using one of the TI SDK  (also use the ROM's driverlib binaries ).

Initially I thought to use CC13xxware DriverLib, but a friend told me that TI was working in a kernel abstraction layer that would allow any RTOS to use the high-level drivers.

Which path would be the most recommended in this case?

Is there any article or doc about the use of such kernel abstract layer?

many thanks,

Cristiano


LP55231: Firmware for multi-color reproduction and effects

$
0
0

Part Number:LP55231

I have LP55231 connected to 3 RGB leds. I am trying to reproduce three colors say, pink, violet and maroon in the 3 leds and then fade out to violet, maroon and pink. In this case, the PWM values of all the 9 channels of the driver need to have different values. Achieving the colors is a simple task direct sequentially setting the PWM values of all nine channels. But to achieve fading effect, say for time 1sec, the sequential procedure doesn't work out. In this case, we need to achieve by parallel execution. I have tried using multiple engines(1 engine to 1RGB) but still fade effect is not smooth. Navigating colors in hsl color space looks good. But implementing HSL abstraction or similar one cannot be achieved here due to limited instructions and resources. Can someone help here about achieving this effect?  

LAUNCHXL-CC2640R2: Amount of Flash memory used by program

$
0
0

Part Number:LAUNCHXL-CC2640R2

I am using the CC2640R2F launchpad to develop and test firmware for BLE application which will be deployed on a custom board, I am trying to din out how much memory is being used by my code to decide on wether to include an external memory chip as in the launchpad. Is it possible to find out the amount of flash memory used from CCS?

Thanks

RTOS/CC1350: Authentication with SimpleBLEPeripheral and BLE Device monitor

$
0
0

Part Number:CC1350

Tool/software:TI-RTOS

I have a SimpleBLEPeripheral app running on CC1350 quit well, and I can see the device attributes and there contain on the BLE device monitor.

I want to check its Authentication capability so I use the char5 with GATT_PERMIT_AUTHEN_READ . I know that for general case when it is use with smartphone there is a handshake of numerator between them (0000 or 1234), but on the monitor when I press the char5 characteristic I get the message (ErrorRsp[FFF5] st=0 oc=0x000A err=5). Is it possible at all with teh monitor and if the answer is yes, what it the procedure to make the  Authentication process?

Reagrs

Bar.

MSP430F2370: Above component compatible for NFC module

RTOS/LAUNCHXL-CC2650: Using System_printf over UART issues

$
0
0

Part Number:LAUNCHXL-CC2650

Tool/software:TI-RTOS

Hello, I am trying to get my launchpad to print text over UART via the System_printf function.  I have followed the directions at the following website.

I changed the .cfg file to include references to the uart putch function and uartfluch function.  Below is my cfg file:

/******************************************************************************

@file cc2640.cfg

@brief TI RTOS Configuration file for CC26xx

Imported Symbols
Note: These symbols are defined following the --cfgArgs option.
In IAR this is done at the end of the pre-build step. In CCS, this
is done in Properties->build->XDCtools-Advanced options->Configuration
script arguments. Multiple symbols can be used separating them by a
comma (",").

By default, TI RTOS builds with RTOS in ROM, interrupt vectors starting
at address 0x0 and uses ROM only kernel modules.

NO_ROM: When set to a non-zero value, RTOS builds in Flash instead
of ROM
OAD_IMG_A: When set to a non-zero value, interrupt vectors are set to
their expected location for on-chip OAD Image A.
OAD_IMG_B: When set to a non-zero value, interrupt vectors are set to
their expected location for on-chip OAD Image B.
OAD_IMG_E: When set to a non-zero value, interrupt vectors are set to
their expected location for external flash OAD.
USE_EVENTS: Build the RTOS Kernel Event module.

Group: WCS, BTS
Target Device: CC2650, CC2640, CC1350

******************************************************************************

Copyright (c) 2013-2016, Texas Instruments Incorporated
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

* Neither the name of Texas Instruments Incorporated nor the names of
its contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

******************************************************************************
Release Name: ble_sdk_2_02_01_18
Release Date: 2016-10-26 15:20:04
*****************************************************************************/


/* ================ ROM configuration ================ */
/*
* To use BIOS in flash, comment out the code block below.
*/
if (typeof NO_ROM == 'undefined' || (typeof NO_ROM != 'undefined' && NO_ROM == 0))
{
var ROM = xdc.useModule('ti.sysbios.rom.ROM');
if (Program.cpu.deviceName.match(/CC26/)) {
ROM.romName = ROM.CC2650;
}
else if (Program.cpu.deviceName.match(/CC13/)) {
ROM.romName = ROM.CC1350;
}
}



/* ================ Boot configuration ================ */
if (typeof NO_ROM == 'undefined' || (typeof NO_ROM != 'undefined' && NO_ROM == 0))
{
var Boot = xdc.useModule('ti.sysbios.family.arm.cc26xx.Boot');
}
/*
* This module contains family specific Boot APIs and configuration settings.
* See the SYS/BIOS API guide for more information.
*/
if (typeof NO_ROM == 'undefined' || (typeof NO_ROM != 'undefined' && NO_ROM == 0))
{
Boot.driverlibVersion = 2;
Boot.customerConfig = false;
}


/* ================ Clock configuration ================ */
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
/*
* When using Power and calibrateRCOSC is set to true, this should be set to 10.
* The timer used by the Clock module supports TickMode_DYNAMIC. This enables us
* to set the tick period to 10 us without generating the overhead of additional
* interrupts.
*
* Note: The calibrateRCOSC parameter is set within the Power configuration
* structure in the "Board.c" file.
*/
Clock.tickPeriod = 10;
Clock.swiPriority = 5;


/* ================ Types configuration ================ */
var Types = xdc.useModule('xdc.runtime.Types');
/*
* This module defines basic constants and types used throughout the
* xdc.runtime package.
*/



/* ================ Defaults (module) configuration ================ */
var Defaults = xdc.useModule('xdc.runtime.Defaults');
/*
* A flag to allow module names to be loaded on the target. Module name
* strings are placed in the .const section for debugging purposes.
*
* Pick one:
* - true (default)
* Setting this parameter to true will include name strings in the .const
* section so that Errors and Asserts are easier to debug.
* - false
* Setting this parameter to false will reduce footprint in the .const
* section. As a result, Error and Assert messages will contain an
* "unknown module" prefix instead of the actual module name.
*
* When using BIOS in ROM:
* This option must be set to false.
*/
//Defaults.common$.namedModule = true;
Defaults.common$.namedModule = false;

/* Compile out all Assert's */
//Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;

/* Allow Mod_create() and Mod_construct() but not delete() or destruct() */
Defaults.common$.memoryPolicy = Types.CREATE_POLICY;



/* ================ Error configuration ================ */
var Error = xdc.useModule('xdc.runtime.Error');
/*
* This function is called to handle all raised errors, but unlike
* Error.raiseHook, this function is responsible for completely handling the
* error with an appropriately initialized Error_Block.
*
* Pick one:
* - Error.policyDefault (default)
* Calls Error.raiseHook with an initialized Error_Block structure and logs
* the error using the module's logger.
* - Error.policySpin
* Simple alternative that traps on a while(1) loop for minimized target
* footprint.
* Using Error.policySpin, the Error.raiseHook will NOT called.
*/
//Error.policyFxn = Error.policyDefault;
Error.policyFxn = Error.policySpin;

/*
* If Error.policyFxn is set to Error.policyDefault, this function is called
* whenever an error is raised by the Error module.
*
* Pick one:
* - Error.print (default)
* Errors are formatted and output via System_printf() for easier
* debugging.
* - null
* Errors are trapped with a while(1) stub function. This option reduces
* code footprint.
* - non-null function
* Errors invoke custom user function. See the Error module documentation
* for more details.
*/
//Error.raiseHook = Error.print;
Error.raiseHook = null;
//Error.raiseHook = "&myErrorFxn";

/*
* If Error.policyFxn is set to Error.policyDefault, this option applies to the
* maximum number of times the Error.raiseHook function can be recursively
* invoked. This option limits the possibility of an infinite recursion that
* could lead to a stack overflow.
* The default value is 16.
*/
Error.maxDepth = 2;



/* ================ Hwi configuration ================ */
var halHwi = xdc.useModule('ti.sysbios.hal.Hwi');
var m3Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
/*
* Checks for Hwi (system) stack overruns while in the Idle loop.
*
* Pick one:
* - true (default)
* Checks the top word for system stack overflows during the idle loop and
* raises an Error if one is detected.
* - false
* Disabling the runtime check improves runtime performance and yields a
* reduced flash footprint.
*/
//halHwi.checkStackFlag = true;
halHwi.checkStackFlag = false;

/*
* The following options alter the system's behavior when a hardware exception
* is detected.
*
* Pick one:
* - Hwi.enableException = true
* This option causes the default m3Hwi.excHandlerFunc function to fully
* decode an exception and dump the registers to the system console.
* This option raises errors in the Error module and displays the
* exception in ROV.
* - Hwi.enableException = false
* This option reduces code footprint by not decoding or printing the
* exception to the system console.
* It however still raises errors in the Error module and displays the
* exception in ROV.
* - Hwi.excHandlerFunc = null
* This is the most aggressive option for code footprint savings; but it
* can difficult to debug exceptions. It reduces flash footprint by
* plugging in a default while(1) trap when exception occur. This option
* does not raise an error with the Error module.
*/
//m3Hwi.enableException = true;
//m3Hwi.enableException = false;
m3Hwi.excHandlerFunc = null;

/*
* Enable hardware exception generation when dividing by zero.
*
* Pick one:
* - 0 (default)
* Disables hardware exceptions when dividing by zero
* - 1
* Enables hardware exceptions when dividing by zero
*/
m3Hwi.nvicCCR.DIV_0_TRP = 0;
//m3Hwi.nvicCCR.DIV_0_TRP = 1;

/*
* Enable hardware exception generation for invalid data alignment.
*
* Pick one:
* - 0 (default)
* Disables hardware exceptions for data alignment
* - 1
* Enables hardware exceptions for data alignment
*/
m3Hwi.nvicCCR.UNALIGN_TRP = 0;
//m3Hwi.nvicCCR.UNALIGN_TRP = 1;

/* Put reset vector at start of Flash */
if (typeof OAD_IMG_A != 'undefined' && OAD_IMG_A == 1)
{
m3Hwi.resetVectorAddress = 0x0610;
}
else if (typeof OAD_IMG_B != 'undefined' && OAD_IMG_B == 1)
{
m3Hwi.resetVectorAddress = 0x6010;
}
else if (typeof OAD_IMG_E != 'undefined' && OAD_IMG_E == 1)
{
m3Hwi.resetVectorAddress = 0x1010;
}
else
{
m3Hwi.resetVectorAddress = 0x0;
}

/* Put interrupt vector at start of RAM so interrupts can be configured at runtime */
m3Hwi.vectorTableAddress = 0x20000000;

/* CC2650 has 50 interrupts */
m3Hwi.NUM_INTERRUPTS = 50;



/* ================ Idle configuration ================ */
var Idle = xdc.useModule('ti.sysbios.knl.Idle');
Idle.addFunc('&uartPrintf_flush');
/*
* The Idle module is used to specify a list of functions to be called when no
* other tasks are running in the system.
*
* Functions added here will be run continuously within the idle task.
*
* Function signature:
* Void func(Void);
*/
//Idle.addFunc("&myIdleFunc");



/* ================ Kernel (SYS/BIOS) configuration ================ */
var BIOS = xdc.useModule('ti.sysbios.BIOS');
/*
* Enable asserts in the BIOS library.
*
* Pick one:
* - true (default)
* Enables asserts for debugging purposes.
* - false
* Disables asserts for a reduced code footprint and better performance.
*
* When using BIOS in ROM:
* This option must be set to false.
*/
//BIOS.assertsEnabled = true;
BIOS.assertsEnabled = false;

/*
* Specify default heap size for BIOS.
*/
if (typeof NO_ROM == 'undefined' || (typeof NO_ROM != 'undefined' && NO_ROM == 0))
{
BIOS.heapSize = 1668;
}

/*
* A flag to determine if xdc.runtime sources are to be included in a custom
* built BIOS library.
*
* Pick one:
* - false (default)
* The pre-built xdc.runtime library is provided by the respective target
* used to build the application.
* - true
* xdc.runtime library sources are to be included in the custom BIOS
* library. This option yields the most efficient library in both code
* footprint and runtime performance.
*/
//BIOS.includeXdcRuntime = false;
BIOS.includeXdcRuntime = true;

/*
* The SYS/BIOS runtime is provided in the form of a library that is linked
* with the application. Several forms of this library are provided with the
* SYS/BIOS product.
*
* Pick one:
* - BIOS.LibType_Custom
* Custom built library that is highly optimized for code footprint and
* runtime performance.
* - BIOS.LibType_Debug
* Custom built library that is non-optimized that can be used to
* single-step through APIs with a debugger.
*
*/
BIOS.libType = BIOS.LibType_Custom;
//BIOS.libType = BIOS.LibType_Debug;

/*
* Runtime instance creation enable flag.
*
* Pick one:
* - true (default)
* Allows Mod_create() and Mod_delete() to be called at runtime which
* requires a default heap for dynamic memory allocation.
* - false
* Reduces code footprint by disallowing Mod_create() and Mod_delete() to
* be called at runtime. Object instances are constructed via
* Mod_construct() and destructed via Mod_destruct().
*
* When using BIOS in ROM:
* This option must be set to true.
*/
BIOS.runtimeCreatesEnabled = true;
//BIOS.runtimeCreatesEnabled = false;

/*
* Enable logs in the BIOS library.
*
* Pick one:
* - true (default)
* Enables logs for debugging purposes.
* - false
* Disables logging for reduced code footprint and improved runtime
* performance.
*
* When using BIOS in ROM:
* This option must be set to false.
*/
//BIOS.logsEnabled = true;
BIOS.logsEnabled = false;

BIOS.swiEnabled = true;



/* ================ Memory configuration ================ */
var Memory = xdc.useModule('xdc.runtime.Memory');
/*
* The Memory module itself simply provides a common interface for any
* variety of system and application specific memory management policies
* implemented by the IHeap modules(Ex. HeapMem, HeapBuf).
*/
/* Create a small "alloc-only" heap */
if (typeof NO_ROM != 'undefined' && NO_ROM != 0)
{
var HeapMin = xdc.useModule('xdc.runtime.HeapMin');
var heapMinParams = new HeapMin.Params;
heapMinParams.size = 1668;
var myHeapMin = HeapMin.create(heapMinParams);
Memory.defaultHeapInstance = myHeapMin;
}



/* ================ Program configuration ================ */
/*
* Program.stack is ignored with IAR. Use the project options in
* IAR Embedded Workbench to alter the system stack size.
*/
if (typeof NO_ROM == 'undefined' || (typeof NO_ROM != 'undefined' && NO_ROM == 0))
{
Program.stack = 1024;
Program.argSize = 0;
}
else
{
Program.stack = 512;
}



/* ================ Semaphore configuration ================ */
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
/*
* Enables global support for Task priority pend queuing.
*
* Pick one:
* - true (default)
* This allows pending tasks to be serviced based on their task priority.
* - false
* Pending tasks are services based on first in, first out basis.
*
* When using BIOS in ROM:
* This option must be set to false.
*/
//Semaphore.supportsPriority = true;
Semaphore.supportsPriority = false;

/*
* Allows for the implicit posting of events through the semaphore,
* disable for additional code saving.
*
* Pick one:
* - true
* This allows the Semaphore module to post semaphores and events
* simultaneously.
* - false (default)
* Events must be explicitly posted to unblock tasks.
*
* When using BIOS in ROM:
* This option must be set to false.
*/
//Semaphore.supportsEvents = true;
Semaphore.supportsEvents = false;




/* ================ Events configuration ================ */
if (typeof USE_EVENTS != 'undefined' && USE_EVENTS != 0)
{
var Events = xdc.useModule('ti.sysbios.knl.Event');
}



/* ================ Swi configuration ================ */
var Swi = xdc.useModule('ti.sysbios.knl.Swi');
/*
* A software interrupt is an object that encapsulates a function to be
* executed and a priority. Software interrupts are prioritized, preempt tasks
* and are preempted by hardware interrupt service routines.
*
* This module is included to allow Swi's in a users' application.
*/
Swi.numPriorities = 6;



/* ================ System configuration ================ */
var System = xdc.useModule('xdc.runtime.System');
/*
* The Abort handler is called when the system exits abnormally.
*
* Pick one:
* - System.abortStd (default)
* Call the ANSI C Standard 'abort()' to terminate the application.
* - System.abortSpin
* A lightweight abort function that loops indefinitely in a while(1) trap
* function.
* - A custom abort handler
* A user-defined function. See the System module documentation for
* details.
*/
//System.abortFxn = System.abortStd;
System.abortFxn = System.abortSpin;
//System.abortFxn = "&myAbortSystem";

/*
* The Exit handler is called when the system exits normally.
*
* Pick one:
* - System.exitStd (default)
* Call the ANSI C Standard 'exit()' to terminate the application.
* - System.exitSpin
* A lightweight exit function that loops indefinitely in a while(1) trap
* function.
* - A custom exit function
* A user-defined function. See the System module documentation for
* details.
*/
//System.exitFxn = System.exitStd;
System.exitFxn = System.exitSpin;
//System.exitFxn = "&myExitSystem";

/*
* Minimize exit handler array in the System module. The System module includes
* an array of functions that are registered with System_atexit() which is
* called by System_exit(). The default value is 8.
*/
System.maxAtexitHandlers = 0;

/*
* The System.SupportProxy defines a low-level implementation of System
* functions such as System_printf(), System_flush(), etc.
*
* Pick one pair:
* - SysMin
* This module maintains an internal configurable circular buffer that
* stores the output until System_flush() is called.
* The size of the circular buffer is set via SysMin.bufSize.
* - SysCallback
* SysCallback allows for user-defined implementations for System APIs.
* The SysCallback support proxy has a smaller code footprint and can be
* used to supply custom System_printf services.
* The default SysCallback functions point to stub functions. See the
* SysCallback module's documentation.
*/
//var SysMin = xdc.useModule('xdc.runtime.SysMin');
//SysMin.bufSize = 128;
//System.SupportProxy = SysMin;
var SysCallback = xdc.useModule('xdc.runtime.SysCallback');
System.SupportProxy = SysCallback;
SysCallback.putchFxn = "&uartPrintf_putch";
//SysCallback.abortFxn = "&myUserAbort";
//SysCallback.exitFxn = "&myUserExit";
//SysCallback.flushFxn = "&myUserFlush";
//SysCallback.putchFxn = "&myUserPutch";
//SysCallback.readyFxn = "&myUserReady";



/* ================ Task configuration ================ */
var Task = xdc.useModule('ti.sysbios.knl.Task');
/*
* Check task stacks for overflow conditions.
*
* Pick one:
* - true (default)
* Enables runtime checks for task stack overflow conditions during
* context switching ("from" and "to")
* - false
* Disables runtime checks for task stack overflow conditions.
*
* When using BIOS in ROM:
* This option must be set to false.
*/
//Task.checkStackFlag = true;
Task.checkStackFlag = false;

/*
* Set the default task stack size when creating tasks.
*
* The default is dependent on the device being used. Reducing the default stack
* size yields greater memory savings.
*/
Task.defaultStackSize = 512;

/*
* Enables the idle task.
*
* Pick one:
* - true (default)
* Creates a task with priority of 0 which calls idle hook functions. This
* option must be set to true to gain power savings provided by the Power
* module.
* - false
* No idle task is created. This option consumes less memory as no
* additional default task stack is needed.
* To gain power savings by the Power module without having the idle task,
* add Idle.run as the Task.allBlockedFunc.
*/
Task.enableIdleTask = true;
//Task.enableIdleTask = false;
//Task.allBlockedFunc = Idle.run;

/*
* If Task.enableIdleTask is set to true, this option sets the idle task's
* stack size.
*
* Reducing the idle stack size yields greater memory savings.
*/
Task.idleTaskStackSize = 512;

/*
* Reduce the number of task priorities.
* The default is 16.
* Decreasing the number of task priorities yield memory savings.
*/
Task.numPriorities = 6;



/* ================ Text configuration ================ */
var Text = xdc.useModule('xdc.runtime.Text');
/*
* These strings are placed in the .const section. Setting this parameter to
* false will save space in the .const section. Error, Assert and Log messages
* will print raw ids and args instead of a formatted message.
*
* Pick one:
* - true (default)
* This option loads test string into the .const for easier debugging.
* - false
* This option reduces the .const footprint.
*/
//Text.isLoaded = true;
Text.isLoaded = false;



/* ================ TI-RTOS middleware configuration ================ */
var mwConfig = xdc.useModule('ti.mw.Config');
/*
* Include TI-RTOS middleware libraries
*/



/* ================ TI-RTOS drivers' configuration ================ */
var driversConfig = xdc.useModule('ti.drivers.Config');
/*
* Include TI-RTOS drivers
*
* Pick one:
* - driversConfig.LibType_NonInstrumented (default)
* Use TI-RTOS drivers library optimized for footprint and performance
* without asserts or logs.
* - driversConfig.LibType_Instrumented
* Use TI-RTOS drivers library for debugging with asserts and logs enabled.
*/
driversConfig.libType = driversConfig.LibType_NonInstrumented;
//driversConfig.libType = driversConfig.LibType_Instrumented;



// Remaining Modules
var Diags = xdc.useModule('xdc.runtime.Diags');
var Main = xdc.useModule('xdc.runtime.Main');
var Reset = xdc.useModule('xdc.runtime.Reset');

Here is my main function before jumping into BIOS_start():

/******************************************************************************

 @file  main.c

 @brief main entry of the BLE stack sample application.

 Group: WCS, BTS
 Target Device: CC2650, CC2640, CC1350

 ******************************************************************************
 
 Copyright (c) 2013-2016, Texas Instruments Incorporated
 All rights reserved.

 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
 are met:

 *  Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.

 *  Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.

 *  Neither the name of Texas Instruments Incorporated nor the names of
    its contributors may be used to endorse or promote products derived
    from this software without specific prior written permission.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 ******************************************************************************
 Release Name: ble_sdk_2_02_01_18
 Release Date: 2016-10-26 15:20:04
 *****************************************************************************/
 
/*******************************************************************************
 * INCLUDES
 */

#include <xdc/runtime/Error.h>

#include <ti/drivers/Power.h>
#include <ti/drivers/power/PowerCC26XX.h>
#include <ti/sysbios/BIOS.h>

#include "icall.h"
#include "hal_assert.h"
#include "central.h"
#include "simple_central.h"

/* Header files required to enable instruction fetch cache */
#include <inc/hw_memmap.h>
#include <driverlib/vims.h>

#ifndef USE_DEFAULT_USER_CFG

#include "ble_user_config.h"

// BLE user defined configuration
bleUserCfg_t user0Cfg = BLE_USER_CFG;

#endif // USE_DEFAULT_USER_CFG

#include <ti/mw/display/Display.h>

//For serial comms via USB to PUTTY terminal.  To use, call System_printf("....");
//To work, must connect DIO12 (check board.h) of CC2640 to TXD pin of JTAG XDS100 programmer
//Also, appBLE.cfg file must be updated
#include "uart_printf.h"
#include <xdc/runtime/System.h>
#include <ti/drivers/UART.h>
#include <ti/drivers/uart/UARTCC26XX.h>

//For Seven segment display
#include <driverlib/ioc.h>
#include <driverlib/gpio.h>
#include "driverlib/cpu.h"

/*******************************************************************************
 * MACROS
 */

/*******************************************************************************
 * CONSTANTS
 */

#define DISPLAY_MASK  (GPIO_DIO_0_MASK | GPIO_DIO_1_MASK | GPIO_DIO_2_MASK | GPIO_DIO_3_MASK | GPIO_DIO_4_MASK | GPIO_DIO_5_MASK| GPIO_DIO_6_MASK)
#define DISPLAY_ENABLE  (GPIO_DIO_7_MASK | GPIO_DIO_8_MASK)

//bit patterns correlate to a standard seven segment display layout in reverse order: 0b0GFEDCBA
#define blank 	0b01000000
#define zero 	0b00111111
#define one 	0b00000110
#define two 	0b01011011
#define three 	0b01001111
#define four 	0b01100110
#define five 	0b01101101
#define six 	0b01111101
#define seven 	0b00000111
#define eight 	0b01111111
#define nine 	0b01100111
#define cee 	0b00111001
#define aitch 	0b01110110
#define el 		0b00111000

/*******************************************************************************
 * TYPEDEFS
 */

/*******************************************************************************
 * LOCAL VARIABLES
 */

/*******************************************************************************
 * GLOBAL VARIABLES
 */

/*******************************************************************************
 * EXTERNS
 */

extern void AssertHandler(uint8 assertCause, uint8 assertSubcause);

extern Display_Handle dispHandle;

/*******************************************************************************
 * FUNCTION PROTOTYPES
 */

void setupUART(void);
void setupDisplay(void);
void setupModeSwitch(void);
void testModeSwitch(void);

/*******************************************************************************
 * @fn          Main
 *
 * @brief       Application Main
 *
 * input parameters
 *
 * @param       None.
 *
 * output parameters
 *
 * @param       None.
 *
 * @return      None.
 */
int main()
   {
	/* Register Application callback to trap asserts raised in the Stack */
	RegisterAssertCback(AssertHandler);

	PIN_init(BoardGpioInitTable);

	// Enable iCache prefetching
	VIMSConfigure(VIMS_BASE, TRUE, TRUE);

	// Enable cache
	VIMSModeSet(VIMS_BASE, VIMS_MODE_ENABLED);

	setupUART();

    setupDisplay();

    setupModeSwitch();

    //testModeSwitch();

    /* Initialize ICall module */
    ICall_init();

    /* Start tasks of external images - Priority 5 */
    ICall_createRemoteTasks();

    /* Kick off profile - Priority 3 */
    GAPCentralRole_createTask();

    /* Kick off application - Priority 1 */
    SimpleBLECentral_createTask();

    /* enable interrupts and start SYS/BIOS */
    BIOS_start();

    return 0;
}

/*******************************************************************************
 * @fn          setupUART
 *
 * @brief       Initialization of UART used for serial communication via System_printf("...")
 *
 * input parameters
 *
 * @param       None.
 *
 * output parameters
 *
 * @param       None.
 *
 * @return      None.
 */
void setupUART(void){

	UART_Handle handle;

	// Enable System_printf(..) UART output
	UART_Params uartParams;
	UART_Params_init(&uartParams);
	uartParams.baudRate = 115200;
	//UartPrintf_init(UART_open(Board_UART, &uartParams));
	handle = UART_open(Board_UART, &uartParams);

	System_printf("\f\r");
	System_printf("THIS IS A TEST OF THE UART\n");

	uint8_t S[7] = {'\f','\r','T','E','S','T','\n'};
	UART_write(handle,&S,7);
}

/*******************************************************************************
 * @fn          setupModeSwitch
 *
 * @brief       Initialization of 3 mode rotary switch
 *
 * input parameters
 *
 * @param       None.
 *
 * output parameters
 *
 * @param       None.
 *
 * @return      None.
 */
void setupModeSwitch(void){

	//Initialize as general input
	IOCPinTypeGpioInput(IOID_21);//Mode 3
	IOCPinTypeGpioInput(IOID_22);//Mode 1
	IOCPinTypeGpioInput(IOID_23);//Mode 2

	//Setup interrupts to detect mode change
	IOCIOIntSet(IOID_21,IOC_INT_ENABLE,IOC_RISING_EDGE);
	IOCIOIntSet(IOID_22,IOC_INT_ENABLE,IOC_RISING_EDGE);
	IOCIOIntSet(IOID_23,IOC_INT_ENABLE,IOC_RISING_EDGE);

	//Set pull down resistor for when mode is inactive
	IOCIOPortPullSet(IOID_21,IOC_IOPULL_DOWN);
	IOCIOPortPullSet(IOID_22,IOC_IOPULL_DOWN);
	IOCIOPortPullSet(IOID_23,IOC_IOPULL_DOWN);

}

/*******************************************************************************
 * @fn          testModeSwitch
 *
 * @brief       Testing of all 3 modes of rotary.  This function will not be escaped if test fails.
 *
 * input parameters
 *
 * @param       None.
 *
 * output parameters
 *
 * @param       None.
 *
 * @return      None.
 */
void testModeSwitch(void){

	//Test read via display.  First read 3, then 1, then 2
	GPIO_writeMultiDio(DISPLAY_MASK,three);
	while(!GPIO_readDio(IOID_21));

	GPIO_writeMultiDio(DISPLAY_MASK,one);
	while(!GPIO_readDio(IOID_22));

	GPIO_writeMultiDio(DISPLAY_MASK,two);
	while(!GPIO_readDio(IOID_23));

	GPIO_writeMultiDio(DISPLAY_MASK,blank);

}

/*******************************************************************************
 * @fn          setupDisplay
 *
 * @brief       Initialization of all pins used for seven segment display
 *
 * input parameters
 *
 * @param       None.
 *
 * output parameters
 *
 * @param       None.
 *
 * @return      None.
 */
void setupDisplay(void){

	//Setup 7 Segment Display
	IOCPinTypeGpioOutput(IOID_0);
	IOCPinTypeGpioOutput(IOID_1);
	IOCPinTypeGpioOutput(IOID_2);
	IOCPinTypeGpioOutput(IOID_3);
	IOCPinTypeGpioOutput(IOID_4);
	IOCPinTypeGpioOutput(IOID_5);
	IOCPinTypeGpioOutput(IOID_6);
	IOCPinTypeGpioOutput(IOID_7);
	IOCPinTypeGpioOutput(IOID_8);

	IOCIODrvStrengthSet(IOID_0,IOC_STRENGTH_MAX,IOC_CURRENT_8MA);
	IOCIODrvStrengthSet(IOID_1,IOC_STRENGTH_MAX,IOC_CURRENT_8MA);
	IOCIODrvStrengthSet(IOID_2,IOC_STRENGTH_MAX,IOC_CURRENT_8MA);
	IOCIODrvStrengthSet(IOID_3,IOC_STRENGTH_MAX,IOC_CURRENT_8MA);
	IOCIODrvStrengthSet(IOID_4,IOC_STRENGTH_MAX,IOC_CURRENT_8MA);
	IOCIODrvStrengthSet(IOID_5,IOC_STRENGTH_MAX,IOC_CURRENT_8MA);
	IOCIODrvStrengthSet(IOID_6,IOC_STRENGTH_MAX,IOC_CURRENT_8MA);
	IOCIODrvStrengthSet(IOID_7,IOC_STRENGTH_MAX,IOC_CURRENT_8MA);
	IOCIODrvStrengthSet(IOID_8,IOC_STRENGTH_MAX,IOC_CURRENT_8MA);

	IOCIOPortPullSet(IOID_7,IOC_IOPULL_UP);
	IOCIOPortPullSet(IOID_8,IOC_IOPULL_UP);

	GPIO_setOutputEnableMultiDio(DISPLAY_MASK | DISPLAY_ENABLE,DISPLAY_MASK | DISPLAY_ENABLE);

	GPIO_writeMultiDio(DISPLAY_ENABLE,0x00);

	//Initialize to blank display
	GPIO_writeMultiDio(DISPLAY_MASK,blank);

}


It seems like the UART is setup fine, you can see in my setupUART() function that I directly write to it. That wI can see on PuTTy, but System_printf() is not working for some reason. Any advice on where to look/start would be helpful. I have read a lot on this forum but nothing that has helped me directly.

I am using tirtos_cc13xx_cc26xx_2_20_01_08, and ble_sdk_2_02_01_18.

I am developing with CCS Version 6.1.3.00034, and compiler TI v15.12.5.LTS

Thanks!

CCS/TM4C123GH6PM: UART faile

$
0
0

Part Number:TM4C123GH6PM

Tool/software: Code Composer Studio

I dont transmit data to terminal .I use UART3 in library tiva C.Can you help me?

/*
* main.c
*
* Created on: Oct 29, 2017
* Author: huong
*/
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <assert.h>
#include "inc/tm4c123gh6pm.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/pin_map.h"
#include "driverlib/sysctl.h"
#include "driverlib/interrupt.h"
#include "driverlib/gpio.h"
#include "driverlib/timer.h"
#include "driverlib/adc.h"
#include "driverlib/uart.h"
#include "inc/hw_ints.h"

int main()
{
SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART3);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);
GPIOPinConfigure(GPIO_PC6_U3RX);
GPIOPinConfigure(GPIO_PC7_U3TX);
GPIOPinTypeUART(GPIO_PORTC_BASE, GPIO_PIN_6| GPIO_PIN_7);
UARTConfigSetExpClk(UART3_BASE, SysCtlClockGet(), 115200,
(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE));
UARTFIFOEnable(UART3_BASE);
UARTEnable(UART3_BASE);
IntMasterEnable(); //enable processor interrupts
IntEnable(INT_UART3); //enable the UART interrupt
UARTIntEnable(UART3_BASE, UART_INT_RX); //only enable RX
UARTFIFOLevelSet(UART3_BASE,UART_FIFO_TX1_8,UART_FIFO_RX1_8);
IntPrioritySet(INT_UART3,1);
while(1)
{
UARTCharPut(UART3_BASE,'x');
SysCtlDelay(SysCtlClockGet()/1000);
}
}

CC3220SF-LAUNCHXL: WiFi not work on custom PCB

$
0
0

Part Number:CC3220SF-LAUNCHXL

Hi guys! I'm asking help to understand what's happening. Here the scenario:

  1. I designed my own custom board for CC3220SF
  2. few month ago I made a prototype mounting the components by myself
  3. I used the oob and the power_measurement examples to test the board: all worked fine!
  4. then I ordered some samples to a PCB assembly manufacturer (no relevant changes with my prototype (just a couple of leds or buttons)
  5. all seems to work fine... except the WiFi :-/ it stucks waiting the connection event and nothing happens. For example, in power_measurement:
int32_t wlanConnect(void)
{
    SlWlanSecParams_t secParams = {0};
    int32_t status = 0;

    secParams.Key = (signed char*)SECURITY_KEY;
    secParams.KeyLen = strlen(SECURITY_KEY);
    secParams.Type = SECURITY_TYPE;

    status = sl_WlanConnect((signed char*)SSID_NAME, strlen(SSID_NAME), 0, &secParams, 0);
    ASSERT_ON_ERROR(status);
    
    UART_PRINT("Trying to connect to AP : %s\n\r", SSID_NAME);
    sl_Task(NULL);
    // Wait for WLAN Event
    while((!IS_CONNECTED(PowerMeasure_CB.slStatus)) || (!IS_IP_ACQUIRED(PowerMeasure_CB.slStatus)))
    { 
        /* Turn on user LED */
        GPIO_write(Board_LED0, Board_LED_ON);
        ClockP_usleep(50000);
        /* Turn off user LED */
        GPIO_write(Board_LED0, Board_LED_OFF);
        ClockP_usleep(50000);
        sl_Task(NULL);
    }

    return 0;   
}

It runs forever in the while loop because no event is fired.
Of course I tried different units but the behavior is exactly the same.

To prepare a new unit I do the following:

  1. connect with UniFlash
  2. update the MAC address (usually it does this automatically) and check it's in development mode
  3. create and burn the image (the same on my prototype)
  4. run the examples from CCS

First of all I need to be sure I didn't miss some configuration steps... then I'm kindly asking for any idea about hardware issues. What could I check?


BQ24157: What does the week battery voltage means

$
0
0

Part Number:BQ24157

Dear all,

Could  you please tell me what the week battery voltage threshold means in the datasheet, we have Reg01 B5:B4 to set its voltage.

Thanks.

CCS/EK-TM4C123GXL: CCS/EK-TM4C123GXL:

$
0
0

Part Number:EK-TM4C123GXL

Tool/software: Code Composer Studio

hello every body 

i am beginner on Tiva C microcontroller and CCS i follow all instructions that i include the Tivaware_c _series folder in include options from build and  adding Path for library  but it couldnt include the utils libraries which 

i try to include uartstdio.h for UARTStdioConfig many times by changing the Path directory and Include option i also follow the instruction of the link 

by changing properties->Build->ARM Compiler-> Pre_define name and add  PART_IS_BLIZZARD_RB but it doesnot work 

Any one could Help ??

DP83867IR: Can DP83867 be used for fiber communication(1000Base-X fiber)?

$
0
0

Part Number:DP83867IR

Hello,

We want to use DP83867 for ethernet application, the ethernet interface is copper and fiber, we want to use two DP83867, one for copper and the other for fiber, is DP83867 right for the application? if not, please recommend some devices.

Thank you!

Linux/TMDSEVM572X: Does the "SDK Demos Video Analytics" support any USB webcam (UVC )?

$
0
0

Part Number:TMDSEVM572X

Tool/software: Linux

Hi, 

I have an out of the box AM5728 EVM and I've tried to use the video analytics demo that is bundled but with a usb webcam. This is my first time using a TI linux platform. Naively I expected it to work but while the application loads and asks me to connect to the camera, it says no camera found for id 1. My webcam does appear as a new device at /dev/video1.

Can I check if this should work with any UVC compliant webcam or does it require the camera module?

Thanks,

John

LAUNCHXL-F28377S: How to change the variables declared in flash during code execution?

$
0
0

Part Number:LAUNCHXL-F28377S

I have a requirement of storing big size arrays of ADC results Uint16 type each of more than 2000 pts hence need to place in the flash memory (also there is requirement in application to retain this data after power off).

I am using DATA_SECTION pragma to define these arrays like this:

// Defines
//
#define RESULTS_BUFFER_SIZE 2000 //buffer for storing conversion results
//(size must be multiple of 16)

//
// Globals
//

Uint16 AdcaResults1[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults2[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults3[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults4[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults5[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults6[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults7[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults8[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults9[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults10[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults11[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults12[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults13[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults14[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults15[RESULTS_BUFFER_SIZE];
Uint16 AdcaResults16[RESULTS_BUFFER_SIZE];

Uint16 AdcaResultsFinal[RESULTS_BUFFER_SIZE];


Uint16 resultsIndex;

#pragma DATA_SECTION(AdcaResults1, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults2, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults3, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults4, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults5, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults6, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults7, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults8, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults9, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults10, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults11, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults12, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults13, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults14, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults15, ".AdcResultsFLASH");
#pragma DATA_SECTION(AdcaResults16, ".AdcResultsFLASH");

#pragma DATA_SECTION(AdcaResultsFinal, ".AdcResultsFanalFLASH");

Then Modified linker command file like this:

MEMORY
{
PAGE 0 : /* Program Memory */
...

...

...

/* Flash sectors */
FLASHA : origin = 0x080002, length = 0x001FFE /* on-chip Flash */
FLASHB : origin = 0x082000, length = 0x002000 /* on-chip Flash */
FLASHC : origin = 0x084000, length = 0x002000 /* on-chip Flash */
FLASHD : origin = 0x086000, length = 0x002000 /* on-chip Flash */
FLASHE : origin = 0x088000, length = 0x008000 /* on-chip Flash */
FLASHF : origin = 0x090000, length = 0x008000 /* on-chip Flash */
FLASHG : origin = 0x098000, length = 0x008000 /* on-chip Flash */
FLASHHI : origin = 0x0A0000, length = 0x010000 /* on-chip Flash */
// FLASHI : origin = 0x0A8000, length = 0x008000 /* on-chip Flash */
FLASHJ : origin = 0x0B0000, length = 0x008000 /* on-chip Flash */
FLASHK : origin = 0x0B8000, length = 0x002000 /* on-chip Flash */
FLASHL : origin = 0x0BA000, length = 0x002000 /* on-chip Flash */
FLASHM : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */
FLASHN : origin = 0x0BE000, length = 0x002000 /* on-chip Flash */

PAGE 1 : /* Data Memory */

....

}

SECTIONS
{
......

//Adc results
.AdcResultsFLASH : > FLASHHI, PAGE = 0
.AdcResultsFanalFLASH : > FLASHL, PAGE = 0
.AdcResultsPristineFLASH : > FLASHK, PAGE= 0

......

}

After this program is flashed into flash memory. But the program cant be able to change values of arrays at run time (during execution). i.e. it cant modify the default values of each variable (which is 65535  probably the default value of undefined Uint16).

I dont understand why code cant modify the values stored in the flash memory?

Please suggest me changes in the code so that I can modify variables stored in flash during runtime (code execution) along with it should retain its values after power off.

Thank You 

Mandar Kothavade

RM46L852: Slow Cycle Time

$
0
0

Part Number:RM46L852

Hello, I'm very new to microcontroller programming.

Since I got my launchpad 2xl ive been trying different tutorials found online.

Now I tryed something very simple. Turning on and off a led using one input and one output.

Im using CCS and Halcogen.

The code works but I dont know what i did tot the board because the cycle time is very slow.

Here you have the code.

int main(void)
{
/* USER CODE BEGIN (3) */
gioInit();
int state;
hetInit();

while(1){

printf("%i", state);
printf(" \r\n");

state=gioGetBit(gioPORTA, 0);
if(state==0){

gioSetBit(gioPORTA, 1, 1);

}
else if(state==1){

gioSetBit(gioPORTA, 1, 0);
}
}

/* USER CODE END */

return 0;
}

I print in the console the state of the gioPORTA 0 at every pass of while loop.

And it takes about 1 second for every pass..Which is very slow.

I will post a video below.

Can anyone tell me what a missed up and how to make the board faster or reset it to initial state.

Thank you in advance.

photos.app.goo.gl/uxrjegzerSr6NfgZ2

CCS/CC2640R2F: CC2640R2FRSM

$
0
0

Part Number:CC2640R2F

Tool/software: Code Composer Studio

Hello All,

I'm using CC2640R2FRSM module, example from simplelink_cc2640r2_sdk_1_40_00_45 SDK.

I request to guide on below quiries:

1). I need to change the speed of communication to 128Kbps, what are the chnages required in RF settings?

2). To achieve very good range in communication, what are the settings needed?(In my application i'm using mobile application to test the range).

Please reply ASAP.

Thanks.


Linux/AM3351: LCD Display din't show anything

$
0
0

Part Number:AM3351

Tool/software: Linux

hi, i am using ti-processor-sdk-03.00.00.04 for getting 24 bit LCD display on my am3351 processor based board,

i  did pinmuxing as per below i mentioned. but i am not able to find any light or color changes on my display, please suggest me what we need to take care for getting display on lcd.  

///// .dts File ///

/*
 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
/dts-v1/;

#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/display/tda998x.h>

/ {
    model = "TI AM335x BeagleBone Black";
    compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";

        backlight {
            status = "okay";
            compatible = "pwm-backlight";
            pwms = <&ehrpwm0 0 50000 0>;

            brightness-levels = <
                    0  1  2  3  4  5  6  7  8  9
                    10 11 12 13 14 15 16 17 18 19
                    20 21 22 23 24 25 26 27 28 29
                    30 31 32 33 34 35 36 37 38 39
                    40 41 42 43 44 45 46 47 48 49
                    50 51 52 53 54 55 56 57 58 59
                    60 61 62 63 64 65 66 67 68 69
                    70 71 72 73 74 75 76 77 78 79
                    80 81 82 83 84 85 86 87 88 89
                    90 91 92 93 94 95 96 97 98 99
                    100
                >;
            default-brightness-level = <50>;
        };

    panel {
        compatible = "ti,tilcdc,panel";
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
        panel-info {
            ac-bias           = <255>;
            ac-bias-intrpt    = <0>;
            dma-burst-sz      = <16>;
            bpp               = <32>;
            fdd               = <0x80>;
            sync-edge         = <0>;
            sync-ctrl         = <1>;
            raster-order      = <0>;
            fifo-th           = <0>;
        };

        display-timings {
            800x480p62 {
                clock-frequency = <30000000>;
                hactive = <800>;
                vactive = <480>;
                hfront-porch = <39>;
                hback-porch = <39>;
                hsync-len = <47>;
                vback-porch = <29>;
                vfront-porch = <13>;
                vsync-len = <2>;
                hsync-active = <1>;
                vsync-active = <1>;
            };
        };
        };

};

&ldo3_reg {
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
};

&mmc1 {
    vmmc-supply = <&vmmcsd_fixed>;
};

&mmc2 {
    vmmc-supply = <&vmmcsd_fixed>;
    pinctrl-names = "default";
    pinctrl-0 = <&emmc_pins>;
    bus-width = <8>;
    status = "okay";
};


&cpu0_opp_table {
    /*
     * All PG 2.0 silicon may not support 1GHz but some of the early
     * BeagleBone Blacks have PG 2.0 silicon which is guaranteed
     * to support 1GHz OPP so enable it for PG 2.0 on this board.
     */
    oppnitro@1000000000 {
        opp-supported-hw = <0x06 0x0100>;
    };
};

&am33xx_pinmux {


    nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins {
        pinctrl-single,pins = <
            0xa0 0x08       /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xa4 0x08       /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xa8 0x08       /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xac 0x08       /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xb0 0x08       /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xb4 0x08       /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xb8 0x08       /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xbc 0x08       /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xc0 0x08       /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xc4 0x08       /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xc8 0x08       /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xcc 0x08       /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xd0 0x08       /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xd4 0x08       /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xd8 0x08       /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xdc 0x08       /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
            0xe0 0x00       /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
            0xe4 0x00       /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
            0xe8 0x00       /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
            0xec 0x00       /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */

                0x3c 0x09 /* lcd_data16.lcd_data16, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
                0x38 0x09 /* lcd_data17.lcd_data17, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
                0x34 0x09 /* lcd_data18.lcd_data18, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
                0x30 0x09 /* lcd_data19.lcd_data19, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
               0x2c 0x09 /* lcd_data20.lcd_data20, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
                0x28 0x09 /* lcd_data21.lcd_data21, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
                0x24 0x09 /* lcd_data22.lcd_data22, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
                0x20 0x09 /* lcd_data23.lcd_data23, OMAP_MUX_MODE1 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
        
        >;
    };



    nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins {
        pinctrl-single,pins = <
            0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
        >;
    };

        ehrpwm0_pins: backlight_pins {
            pinctrl-single,pins = <
                    0x164 ( PIN_OUTPUT_PULLUP | MUX_MODE3 ) /* (U14) gpmc_a2.ehrpwm1A */
            >;

        };

    mcasp0_pins: mcasp0_pins {
        pinctrl-single,pins = <
            AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */
            AM33XX_IOPAD(0x99c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/
            AM33XX_IOPAD(0x994, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx */
            AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */
            AM33XX_IOPAD(0x86c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.GPIO1_27 */
        >;
    };


};

&lcdc {
    status = "okay";
    port {
        lcdc_0: endpoint@0 {
        remote-endpoint = <&hdmi_0>;
        };
    };
};
&i2c0 {
   hdmi1: hdmi@70 {
        compatible = "nxp,tda998x";
        reg = <0x70>;
  };
};

&i2c0 {
    tda19988: tda19988 {
        compatible = "nxp,tda998x";
        reg = <0x70>;

        pinctrl-names = "default", "off";
        pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
        pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;

        #sound-dai-cells = <0>;
        audio-ports = <    AFMT_I2S    0x03>;

        ports {
            port@0 {
                hdmi_0: endpoint@0 {
                    remote-endpoint = <&lcdc_0>;
                };
            };
        };
    };
};





&rtc {
    system-power-controller;
};

&epwmss0 {
    status = "okay";

          ehrpwm0: pwm@48300200{  

        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&ehrpwm0_pins>;
    };

};

&mcasp0    {
    #sound-dai-cells = <0>;
    pinctrl-names = "default";
    pinctrl-0 = <&mcasp0_pins>;
    status = "okay";
    op-mode = <0>;    /* MCASP_IIS_MODE */
    tdm-slots = <2>;
    serial-dir = <    /* 0: INACTIVE, 1: TX, 2: RX */
            0 0 1 0
        >;
    tx-num-evt = <32>;
    rx-num-evt = <32>;
};

&sgx {
    status = "okay";
};



/ {
    clk_mcasp0_fixed: clk_mcasp0_fixed {
        #clock-cells = <0>;
        compatible = "fixed-clock";
        clock-frequency = <24576000>;
    };

    clk_mcasp0: clk_mcasp0 {
        #clock-cells = <0>;
        compatible = "gpio-gate-clock";
        clocks = <&clk_mcasp0_fixed>;
        enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */
    };

    sound {
        compatible = "simple-audio-card";
        simple-audio-card,name = "TI BeagleBone Black";
        simple-audio-card,format = "i2s";
        simple-audio-card,bitclock-master = <&dailink0_master>;
        simple-audio-card,frame-master = <&dailink0_master>;

        dailink0_master: simple-audio-card,cpu {
            sound-dai = <&mcasp0>;
            clocks = <&clk_mcasp0>;
        };

        /*simple-audio-card,codec {
            sound-dai = <&tda19988>;
        };*/
    };
};


Thank you.

Compiler: CCS

$
0
0

Tool/software: TI C/C++ Compiler

Hello,

I m new to TI CCS and I am facing trouble using it.I basically need it for a RTOS project but i am not familiar with the software can anybody help me with some paper work and programming examples with TICCS. 

BQ25570: Recommended IC for solar harvesting system powered by a Lithium battery

$
0
0

Part Number:BQ25570

Hi, I'm new with the solar charging IC. I want to check whether the BQ25570 is suitable for my beaconing system or not. My system uses

- TI's HDC1080 Digital Humidity Sensor with Temperature Sensor

- TI's CC2640R2F-Q1 Bluetooth MCU as a Bluetooth beacon for humidity/temperature alarming

RJD3555 rechargeable Lithium-Ion 500mAh coin cell

- Amorton AM-1417CA solar cell, 1.5V, 12.5uA at FL-200lux

Basically, I want to make this beacon to run regardless of the sunlight. If there is ambient sunlight, I want the charger IC to charge the rechargeable Lithium-Ion coin cell.

1. If I have understood correctly, the coin cell will be connected to VBAT and the AM-1417CA will be connected to VIN_DC with L1 and CIN, right?

2. Although it is shown in the application circuit, does the BQ25570 has an internal buck converter like the BQ25010 which can be used for powering the MCU and the HDC1080 sensor?

3. Have I chosen the proper charging IC(BQ25570) and solar cell(AM-1417CA)? I am willing to change both if needed.

Thanks for your time!

Comparison of ADC input types features

$
0
0

Hi, Guys

We know the four types of ADC input:1.Single Ended; 2.Pseudo Differential; 3.Fully Differential; 4.True Differential;

I want to know:

1. What are the characteristics of these four types?(advantage and disadvantage)

2. What  are these application scenarios for each of these four types?

THANK YOU!

Queries about NIR technology

$
0
0

Good afternoon: 

We are looking for assistance off forum if possible (by email or phone). Please advice.

Sincerely,

DLW

Viewing all 262198 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>