This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/LMP91000: changing CO_Sensor Settings.h in SensorBLEPeripheral.c

Part Number: LMP91000


Tool/software: TI C/C++ Compiler

To the author who wrote the CO-Sensor Settings header file for TI Gas sensor platform test kit (IAR Project work space filename = SensorBLEPeripheral)

I would like to add a 1% Variable Bias voltage to the output leads of the LMP91000. (See below 1st picture for details)

May I know how can I do it via the IAR workbench via the CC Debugger?

Note: there are no variables define in the header file CO_Sensor_Settings for me to insert a BIAS_1_PERCENT value to it to make LMP91000 supple 1% of reference voltage to the output. (See below 2 picture for details)

Also I would like to know once I change the values in the header file, how can I upload the firmware with the new value to my TI Gas sensor platform?

Is it by clicking "Build All" in IAR workbench and it will automatically compile all files and upload to the LMP91000?

  • Hi Wee,
    The team that wrote the SW you are referring to is not part of our sensing products support. Let us dig into the owners of the code to forward them your question.

    Regards,
    Jose
  • Thanks Jose! 

    Would the author (Ajinder Singh - See below 1st image) of the Gas Sensor platform Reference Design knows who is the coder for the SensorBLEPeripheral firmware zipped up as TIDA-00056 Gas Sensor Firmware found on  website ti.com/tool/tida-00056 (See image 2 below for details).  There is a readme text file for the firmware which i will attached below image 2 which says " For technical support please visit the Texas Instruments Bluetooth low energy E2E Forum: e2e.ti.com/support/low_power_rf/f/538.aspx. 

    Texas Instruments, Inc.
    
    CC2540/41 Bluetooth Low Energy Software Development Kit
    Release Notes
    
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    
    Version 1.2.1
    Apr 13, 2012
    
    Notices:
    
    - This version of the Texas Instruments BLE stack and software is a minor 
      update to the v1.2 release. It contains some minor enhancements and bug
      fixes, with no API changes or major functional changes.
      
    Changes and Enhancements:
    
    - When advertising is enabled by calling GAP_MakeDiscoverable, the first
      advertisement event will now occur within a few milliseconds, rather than 
      waiting for 10ms.
    
    Bug Fixes:
    
    - The HidEmuKbd project now properly implements the HID Service include of the
      Battery Service. This bug fix allows for proper interoperability between the
      CC254x HID Profile and host systems running Windows 8.
      
    - The source code file hal_board_cfg.h has been updated to better support the
      serial bootloader (SBL) and Universal Bootloader (UBL).
      
    - Scanning in BTool can now be cancelled at any time without hanging or 
      freezing the system.
    
    Known Issues:
    
    - Use of the NV memory (to save application data or BLE Host bonding
      information) during a BLE connection may cause an unexpected disconnect.
      The likelihood of this happening increases with frequent usage, especially
      when using short connection intervals. The cause is related to the NV wear
      algorithm which at some point may cause an NV page erase which can disrupt
      system real-time processing. It is therefore recommended that the NV memory
      be used sparingly, or only when a connection is not active.
    
    For technical support please visit the Texas Instruments Bluetooth low energy
    E2E Forum:
    
    http://e2e.ti.com/support/low_power_rf/f/538.aspx
    
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    
    Version 1.2
    Feb 13, 2012
    
    Notices:
    
    - This version of the Texas Instruments BLE stack and software includes support
      for the CC2541, as well as some enhancements and bug fixes. Details of these
      can be found below. If you have not previously worked with the v1.1b release
      (which had limited distribution) it is recommend that you also read the notes
      detailing the changes and enhancements from v1.1a to v1.1b in addition to the
      notes for v1.2.
    
    Changes and Enhancements:
    
    - All projects have been migrated from IAR v7.60 to IAR v8.10.4. In order to
      build all projects, be sure to upgrade and have IAR v8.10.4. Also, be sure to
      download and install all of the latest patches from IAR for full CC2540 and
      CC2541 support.
    
    - Multi-role and combo-role support has been enhanced. The BLE stack can now
      support simultaneously advertising and/or scanning while in a connection as
      either a master or a slave. This allows for a central device to perform
      device discovery while in a connection. All previous rules for multiple
      simultaneous connections as a central device still apply (see v1.1a release
      notes below).
    
    - New sample projects "SimpleBLEBroadcaster" and "SimpleBLEObserver" have been
      added, as example projects for pure broadcaster and observer applications
      with very low code size. The projects make use of new GAP role profiles
      broacaster.c and observer.c that are included.
    
    - All projects have a modified architecture from the v1.1, v1.1a, and v1.1b
      releases. Each project contains a file "buildConfig.cfg" that can be found in
      the project directory and is included in the IAR project workspace as part of
      the "TOOLS" group. The settings in this file determine the role of the device
      in the application. Based on this configuration, different pieces of the BLE
      stack in object code are linked in, causing the code size to be larger or
      smaller depending on the roles supported. For example, HostTestRelease by
      default is now configured to support every single BLE GAP role in a single
      build, and therefore has a large code size (approx. 165kB). On the other
      hand, SimpleBLEBroadcaster is configured to only support the GAP broadcaster
      role, and therefore has a very small code size (approx. 39kB).
    
    - The function GAPRole_SendUpdateParam in peripheral.c has been made public to
      allow a peripheral application to send an L2CAP connection parameter update
      request at any time.
      
    - The names and configuration of the BLE stack libraries have changed.
      Different libraries are used depending on the GAP role (or combination of
      roles) used by the application. More information can be found in section
      3.3.5the BLE Software Developer's Guide.
    
    - All library files now support power management. Power management must be
      enabled by the application by calling osal_pwrmgr_device( PWRMGR_BATTERY );.
      All sample applications that use power management make this call in the main
      function.
      
    - All GATT service source code has been cleaned up to make handling of client
      characteristic configuration descriptors (CCCDs) simpler. All CCCDs are now
      processing is now handled by GATTServApp and no longer must be handled by the
      service itself. Examples of this can be found in the included example
      services such as SimpleGATTprofile, Simple Keys service, Accelerometer
      service, etc...
    
    - The HostTestRelease network processor project now includes HCI Vendor 
      Specific commands for each GATT client sub-procedure, matching the GATT 
      client API. All GATT commands have been added to the "Adv. Commands" tab in
      BTool. The functions in the BTool GUI "Read / Write" tab now make use of the
      GATT commands as opposed to ATT commands.
    
    - The old "EmulatedKeyboard" project has been removed and replaced with the new
      "HIDEmuKbd" project. The new project performs the same functions as the old
      one, but is now based on the "HID over GATT Profile" v1.0 specification
      (HOGP_SPEC_V10) that has been adopted by the Bluetooth SIG. The HID profile
      functionality has been implemented in a OSAL task that runs separate from the 
      application to allow for easy portability to other HID projects. More details
      on the new application can be found in the BLE Sample Application Guide 
      included as part of the release. The following additional new services / 
      profiles have been included to fully support the HOGP specification:
      
    	- HID Service v1.0 (HIDS_SPEC_V10)
    	
    	- Scan Parameters Profile v1.0 (ScPP_SPEC_V10)
    	
    	- Scan Parameters Service v1.0 (ScPS_SPEC_V10)
    	
    	- Device Information Service v1.1 (DIS_SPEC_V11r00)
    	
    	- Battery Service v1.0 (BAS_SPEC_V10)
      
    - The KeyFobDemo project has been updated to use the adopted battery service.
      The custom battery service that was used in previous released has been 
      removed.
    
    - The TimeApp project has been updated to include support for the Phone Alert
      Status Profile (PASP_SPEC_V10) in the Client role.
      
    - Support for "Production Test Mode" has been added, allowing a BLE application
      in a "single-chip" configuration to temporarily expose the HCI over the UART
      interface when triggered externally to do so (e.g. hold a GPIO pin low during
      power up). This allows the device to be connected to a Bluetooth tester in 
      order to run direct test mode (DTM) commands on a production line using the
      final release firmware, while leaving the UART GPIO pins available for the 
      application to use at all other times
    
    - A Universal Boot Loader (UBL) using the USB Mass Storage Device (USB-MSD) 
      class has been added along with a Serial Boot Loader (SBL). The 
      HostTestRelease project includes configurations with examples of both boot 
      loaders. The SBL project is included with the installer. More information on 
      the UBL can be found in the following document:
      
      C:\Texas Instruments\BLE-CC254x-1.2\Documents\
      Universal Boot Loader for SOC-8051 by USB-MSD Developer's Guide.pdf
    
    - HCI extension command HCI_EXT_MapPmIoPortCmd added to support toggling of a
      GPIO line as CC254x device goes in and out of sleep. This command can be 
      used to automatically control the bypass line of the TPS62730 DC/DC 
      converter for reducing power consumption in an optimized manner.
    
    - A slave device will now dynamically widen it's Rx window when a previous
      connection event was missed. This improves connection stability by accounting
      for additional clock drift that may have occurred since the last successful
      connection event.
      
    - The application now has the capability to change the permissions of the
      device name in the GAP service by calling GGS_SetParameter and changing
      the value of the parameter GGS_W_PERMIT_DEVICE_NAME_ATT. The application can
      also receive a callback when a client device writes a new name to the device. 
      The application registers the callback by calling GGS_RegisterAppCBs. The
      prototype for GGS_RegisterAppCBs can be found in gapgattserver.h.
    
    Bug Fixes:
    
    - Duplicate filtering now works with combination states.
    
    - Various minor application / profile bug fixes.
      
    Known Issues:
    
    - Use of the NV memory (to save application data or BLE Host bonding
      information) during a BLE connection may cause an unexpected disconnect.
      The likelihood of this happening increases with frequent usage, especially
      when using short connection intervals. The cause is related to the NV wear
      algorithm which at some point may cause an NV page erase which can disrupt
      system real-time processing. It is therefore recommended that the NV memory
      be used sparingly, or only when a connection is not active.
    
    For technical support please visit the Texas Instruments Bluetooth low energy
    E2E Forum:
    
    http://e2e.ti.com/support/low_power_rf/f/538.aspx
    
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    
    Version 1.1b
    Nov 30, 2011
    
    Notices:
    
    - This version of the Texas Instruments BLE stack and software includes support
      for the CC2541, as well as some minor enhancements and bug fixes. Details of 
      these can be found below. The general software architecture remains the same 
      as in the v1.1 and v1.1a releases.
      
    Changes and Enhancements:
    
    - BLE stack libraries for the CC2541 are included.
    
    - All BLE libraries are renamed and now indicate whether they are used for 
      CC2540 or CC2541.
    
    - For each project and configuration, new IAR projects are included for use 
      with the CC2541. The only exception is that any project/configuration that
      uses the USB interface has not been replicated for the CC2541, as it does not
      have an on-chip hardware USB interface.
      
    - Link-layer processing has been optimized to provide for reduced power 
      consumption during connection events and advertising events.
      
    - SimpleBLEPeripheral and SimpleBLECentral now use the HCI_EXT_ClkDivOnHaltCmd,
      which reduces the current level while the CC2540/41 radio is active.
    
    - The bond manager has been updated to allow peripheral devices to properly
      pair, bond, and resolve the address of central devices that use the private
      resolvable address type.
    
    - New command HCI_EXT_SetMaxDtmTxPowerCmd included, which allows the maximum
      Tx power level to be set. This is useful when using Direct Test Mode (DTM),
      in that the Tx power level will be set to the maximum value set by the
      HCI_EXT_SetMaxDtmTxPowerCmd command, which may be less than +4dBm for the 
      CC2540 and less than 0dBm for the CC2541. The function prototype can be 
      found in hci.h.
      
    Bug Fixes:
    
    - The command HCI_EXT_SetTxPowerCmd is now properly working.
    
    Known Issues:
    
    - Use of the NV memory (to save application data or BLE Host bonding
      information) during a BLE connection may cause an unexpected disconnect.
      The likelihood of this happening increases with frequent usage, especially
      when using short connection intervals. The cause is related to the NV wear
      algorithm which at some point may cause an NV page erase which can disrupt
      system real-time processing. It is therefore recommended that the NV memory
      be used sparingly, or only when a connection is not active.
    
    - Duplicate filtering does not work when scan is used in combination with a
      connection.
    
    For technical support please visit the Texas Instruments Bluetooth low energy
    E2E Forum:
    
    http://e2e.ti.com/support/low_power_rf/f/538.aspx
    
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    
    Version 1.1a
    Aug 10, 2011
    
    Changes and Enhancements:
       
    - The thermometer profile sample application has been updated to support 
      stored measurements. The TI_BLE_Sample_Applications_Guide has been updated
      to match these changes.
    
    Known Issues:
    
    - Use of the NV memory (to save application data or BLE Host bonding
      information) during a BLE connection may cause an unexpected disconnect.
      The likelihood of this happening increases with frequent usage, especially
      when using short connection intervals. The cause is related to the NV wear
      algorithm which at some point may cause an NV page erase which can disrupt
      system real-time processing. It is therefore recommended that the NV memory
      be used sparingly, or only when a connection is not active.
    
    - Duplicate filtering does not work when scan is used in combination with a
      connection.
    
    For technical support please visit the Texas Instruments Bluetooth low energy
    E2E Forum:
    
    http://e2e.ti.com/support/low_power_rf/f/538.aspx
    
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    
    Version 1.1
    July 13, 2011
    
    Notices:
    
    - This version of the Texas Instruments BLE stack and software features several
      changes, enhancements, and bug fixes from v1.0. Details of these can be found 
      below.
    
    
    Changes and Enhancements:
       
    - All projects have been migrated from IAR v7.51A to IAR v.7.60. In order to
      build all projects, be sure to upgrade and have IAR v7.60. Also, be sure to
      download and install all of the latest patches from IAR for full CC2540
      support.
    
    - The stack now supports up to 3 simultaneous connection as a central / master
      device, with a few constraints:
       	
    	- All connection intervals must be a multiple of the minimum connection
    	  interval (i.e. the minimum connection interval is the greatest common
    	  denominator of all connection intervals).
       	 
       	- The minimum connection interval allowed is 25ms when using more than
       	  one connection.
    
       	- When more than one connection is active, only one data packet per
       	  connection event will be allowed in each direction.
       	  
       	- Scanning is not supported while in a connection. The consequences of
       	  this is that device discovery is not possible while in a connection.
       	  Therefore, to discover and connect to multiple devices, the device
       	  discovery must occur before the first connection is established.   	
    
    - Several new sample projects are included, with examples of many different BLE
      applications / profiles. Full details on the sample applications can be found
      in the BLE Sample Applications Guide, which can be accessed from the Windows
      Start Menu. These sample applications implement various functions. Some are
      based on adopted Bluetooth specifications, some are based on draft
      specifications, and others are custom designed by Texas Instruments. These
      projects should serve as good examples for various other BLE applications.
    
    - The following updates have been made to BTool (more information on these
      updates can be found in the CC2540DK-MINI User Guide which can be downloaded
      here: http://www.ti.com/lit/pdf/swru270):
    	
    	- Improved GUI and robustness.
    	
    	- All functions on the GUI been updated to handle multiple simultaneous
    	  connections.
    	
    	- A new "Pairing / Bonding" tab has been added, allowing link
    	  encryption and authentication, passkey entry, and saving / loading of
    	  long-term key data (from bonding) to file.
    	  
    	- Ability to "Cancel" a link establishment while the dongle is
    	  initiating.
       	
    - The following additional new controller stack features are included in this
      release:
      
    	- Support for multiple simultaneous connections as a master (details
    	  above)
    	
    	- HCI Vendor Specific function HCI_EXT_SetSCACmd allows you to specify
    	  the exact sleep clock accuracy as any value from 0 to 500 PPM, in
    	  order	to support any crystal accuracy with optimal power consumption.
    	  This feature is only available for slave / peripheral applications.
    	
    	- HCI Vendor Specific function HCI_EXT_SetMaxDtmTxPowerCmd allows you
    	  to set the maximum transmit output power for Direct Test Mode. This
    	  allows you to perform use the LE Transmitter Test command with power
    	  levels less than +4dBm.
    	  
    	- A master device can now advertise while in a connection.
    	
    	- New production test mode (PTM) has been added allowing the CC2540 to
    	  run Direct Test Mode (DTM) while connected to a tester using a
    	  "single-chip" BLE library.
    	  
    	- The controller now uses DMA to more efficiently encrypt and decrypt
    	  packets. All BLE projects must now define HAL_AES_DMA=TRUE in the
    	  preprocessor settings when using the v1.1 libraries.
    	  
    - The following additional new host stack features are included in this
      release:
    
    	- A new GAP central role profile for single-chip embedded central
    	  applications is included, with functions similar to the GAP
    	  peripheral role profile. The SimpleBLECentral project serves as an
    	  example of an application making use of the central role profile.
    	
    	- The GAP peripheral role has been optimized to significantly improve
    	  power consumption while advertising with small amounts of data by
    	  no longer transmitting non-significant bytes from in the
    	  advertisement and scan response data.
    
    - The following additional new application / profile features are included in
      this release:
      
      	- The GAP peripheral bond manager has been replaced with a general GAP
    	  bond manager, capable of managing bond data for both peripheral and
    	  central role devices. The gap peripheral bond manager has been
    	  included for legacy support; however it is recommend to switch to the
    	  general GAP bond manager (gapbondmgr.c/h).
    	
    	- The bond manager also now manages the storage of client
    	  characteristic configurations for each bond as per the Bluetooth 4.0
    	  spec.
      	
      	- The simple GATT profile has a new fifth characteristic. This
    	  characteristic is 5 bytes long, and has readable permissions only
    	  while in an authenticated connection. It should serve as a reference
    	  for development of other profiles which require an encrypted link.
      	
      	- All GATT profiles have been updated to properly handle client
      	  characteristic configurations for both single and multiple
      	  connections. Characteristic configurations now get reset to zero
      	  (notifications / indications off) after a connection is terminated,
      	  and the bond manager now stores client characteristic configurations
      	  for bonded devices so that they are remembered for next time when the 
      	  device reconnects.
      	  
      	- Added linker configuration file for support of 128kB flash versions
      	  of the CC2540. An example is included in the SimpleBLEPeripheral
      	  project.
      	  
      	- The SimpleBLEPeripheral project "CC2540 Slave" configuration has been
      	  updated to better support the SmartRF05EB + CC2540EM hardware
      	  platform, making use of the LCD display.
    
    
    Bug Fixes:
    
     - The following bugs have been fixed in the controller stack:
    
    	- Scanning now working for master devices with power savings enabled.
    	
    	- RSSI reads no longer require a data packet to update.
    	
    	- Improved stability when using very high slave latency setting
    	
    	- HCI LE direct test modes now working properly.
    	
    	- HCI Read Local Supported Features now returns the proper value.
    	
    	- Use of two advertising channels now works.
    	
    	- When connecting to a device on the whitelist, the correct peer device
    	  address is returned to the host.  
    	
     - The following bugs have been fixed in the host stack:
     
    	- Pairing no longer fails when either device is using a static, private 
    	  resolvable, or private non-resolvable address.
    
     - The following bugs have been fixed in the profiles / applications:
     
    	- Reading of RSSI with peripheral role profile now working.
    	
    	- Peripheral role profile now allows all legal whitelist modes.
    	
    	- Can now connect with short connection intervals (such as 7.5ms), 
    	  since bond manager now reads data from NV memory upon initialization
    	  rather than immediately after a connection is established. Pairing
    	  still may not be stable when using the bond manager with very short
    	  connection intervals (for reason noted in "Known Issues" below)
    
    
    Known Issues:
    
    - Use of the NV memory (to save application data or BLE Host bonding
      information) during a BLE connection may cause an unexpected disconnect.
      The likelihood of this happening increases with frequent usage, especially
      when using short connection intervals. The cause is related to the NV wear
      algorithm which at some point may cause an NV page erase which can disrupt
      system real-time processing. It is therefore recommended that the NV memory
      be used sparingly, or only when a connection is not active.
    
    - Duplicate filtering does not work when scan is used in combination with a
      connection.
    
    
    For technical support please visit the Texas Instruments Bluetooth low energy
    E2E Forum:
    
    http://e2e.ti.com/support/low_power_rf/f/538.aspx
    
    
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    
    Version 1.0
    October 7, 2010
    
    Notices:
    
    - The Texas Instruments Bluetooth� low energy (BLE) software development kit 
      includes all necessary software to get started on the development of 
      single-mode BLE applications using the CC2540 system-on-chip. It includes 
      object code with the BLE protocol stack, a sample project and applications 
      with source code, and BTool, a Windows PC application for testing BLE 
      applications. In addition to the software, the kit contains documentation, 
      including a developer�s guide and BLE API guide.
    
    - For complete information on the BLE software development kit, please read
      the developer's guide:
      
    	BLE Software Developer's Guide:
    	<Install Directory>\Documents\TI_BLE_Software_Developer's_Guide.pdf
    	(Also can be accessed through the Windows Start Menu)
     
    - The following additional documentation is included:
     	 	
     	BLE API Guide:
     	<Install Directory>\Documents\BLE_API_Guide_main.htm
     	
     	Vendor Specific HCI Guide:
     	<Install Directory>\Documents\TI_BLE_Vendor_Specific_HCI_Guide.pdf
     	
     	HAL Drive API Guide:
     	<Install Directory>\Documents\hal\HAL Driver API.pdf
     	
     	OSAL API Guide:
     	<Install Directory>\Documents\osal\OSAL API.pdf
     	
    - The following software projects are included, all built using IAR Embedded
      Workbench v7.51A:
       
       	SimpleBLEPeripheral:
       	<Install Directory>\Projects\ble\SimpleBLEPeripheral\CC2540DB\SimpleBLEPeripheral.eww
    
    	HostTestRelease:
    	<Install Directory>\Projects\ble\HostTestApp\CC2540\HostTestRelease.eww
    
    - The following Windows PC application is included:
      
      	BTool:
      	<Install Directory>\Projects\BTool\BTool.exe
      	(Also can be accessed through the Windows Start Menu)
     
    Changes:
     
    - Initial Release
    
    Bug Fixes:
     
    - Initial Release
    
    Known Issues:
    
    - Use of the NV memory (to save application data or BLE Host bonding
      information) during a BLE connection may cause an unexpected disconnect.
      The likelihood of this happening increases with frequent usage, especially
      when using short connection intervals. The cause is related to the NV wear
      algorithm which at some point may cause an NV page erase which can disrupt
      system real-time processing. It is therefore recommended that the NV memory
      be used sparingly, or only when a connection is not active.
    
    -------------------------------------------------------------------------------
    -------------------------------------------------------------------------------
    

  • Hi Wee Tan,

    It looks like we both came to the same conclusion, yes the author of the TI Design is Ajinder Singh, and as he instructs, it may be best to visit the Bluetooth low energy E2E forum. Please post you question in that particular forum and please keep us posted, it may be good to include follow up information for posterity.

    Best Regards,
    Matt
  • Thanks Matt,

    I have posted the question in the bluetooth low energy forum.

    Still waiting for someone to reply to me from the forum.