SPRAD88A march   2023  – april 2023 TMS320C28341 , TMS320C28342 , TMS320C28343 , TMS320C28343-Q1 , TMS320C28344 , TMS320C28345 , TMS320C28346 , TMS320C28346-Q1 , TMS320F28P550SJ , TMS320F28P559SJ-Q1

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
  4. 2Byte vs Word Terminology
  5. 3Key Points to Consider
    1. 3.1 8-Bit Data Types are not Supported
    2. 3.2 Memory Size is Expressed in 16 Bits
    3. 3.3 Arrays and Structures: Individual Element Offsets are Different
    4. 3.4 Difference in Standard Data Type Widths
    5. 3.5 Dealing With 8-Bit Communication Protocols
  6. 4References
  7. 5Revision History

Byte vs Word Terminology

Historically, byte is defined as the smallest addressable unit of memory. Hence, technically, the size of a byte is hardware dependent: 16 bits for C28x devices and 8 bits for Arm devices. But nowadays, byte is used as a synonym of 8 bits, since majority of the device architectures are 8 bit addressable. To avoid the confusion, let us use the terminology 8-bit bytes and 16-bit words

Byte and Word Usage in the device feature set Documentation:

GUID-20230206-SS0I-ZFL5-6Z4N-QXZDXLNHFXB6-low.png

From the C28x compiler's perspective, the memory size is always expressed in smallest addressable units, which is 16 bits. This includes the memory length, code/data size provided in the linker cmd files, .map file, and so forth. The standard sizeof() function also returns the size in 16 bits.

  • Memory Map Table in device-specific data sheet:
    Table 2-1 Memory Map Table
    Memory Size Start Address End Address
    LS0 RAM 2K × 16 0x0000 8000 0x0000 87FF
    LS1 RAM 2K × 16 0x0000 8800 0x0000 8FFF
  • Linker command file:
    RAMLS0     : origin = 0x00008000,  length = 0x0800
    RAMLS1     : origin = 0x00008800,  length = 0x0800
  • .map file generated by Code Composer Studio™ (CCS):
    MEMORY CONFIGURATIONS
    
          name          origin       length        used          unused       attr
    -------------      --------      ------        ----          ------       ----
      RAMLS0           00008000     00000800     00000112      000006ee      RWIX
      RAMLS1           00008800     00000800     00000194      0000066c      RWIX
  • sizeof(uint32_t) = 2 → 2 * 16 bits