Questions tagged [msp430]

The msp430 is a family of 16-bit microcontrollers from Texas instruments.

The MSP430 family is designed for low cost, low power consumption embedded applications. The architecture dates from the 1990s and is reminiscent of the DEC PDP-11.

The Wikipedia article contains an extensive description of the architecture and variants, and the home page has an extensive set of technical documents, support tools and products. There is also the developer community.

640 questions
66
votes
11 answers

Command Prompt Error 'C:\Program' is not recognized as an internal or external command, operable program or batch file

I am trying to run the following batch command. The command has been extracted from the IDE so is confirmed working. Getting the error mentioned below. I have tried a few variations with double quotes but they haven't worked. Even on powershell it…
Rohan Sharma
  • 1,416
  • 2
  • 14
  • 19
10
votes
1 answer

MSP430 CMP operator

Let's say I have the MSP430 assembly segment below: r15: 439c Memory map: 4390: 6045 0200 9c43 6400 8844 5044 363a 0000 Code: 448a: cmp #0x363a, 0x0(r15) 4490: jnz $+0x1c 4492: Code continues . . . 44ac: Jump to location The goal is to…
KKK
  • 125
  • 1
  • 7
10
votes
3 answers

Is there an emulator of MSP430 chip that works without the actual chip and integrates with Code Composer Studio?

I need to learn to program MSP430, but don't have the actual chip yet. All configurations that I've tried at Code Composer Studio (except Snapshot, but it does not count, right?) require something on my USB. How do I learn to program the chip…
Irina Rapoport
  • 1,404
  • 1
  • 20
  • 37
10
votes
5 answers

Maximum stack size needed for a C program on MSP430

In a C program that doesn't use recursion, it should be possible in theory to work out the maximum/worst case stack size needed to call a given function, and anything that it calls. Are there any free, open source tools that can do this, either from…
cjc
  • 101
  • 1
  • 4
10
votes
2 answers

How to declare an interrupt handler (ISR) in Mspgcc?

What is the preferred method of declaring an interrupt handler in mspgcc?
Wayne Uroda
  • 5,025
  • 4
  • 30
  • 35
10
votes
3 answers

Why is the uploaded binary size so much smaller than the actual size?

I've only ever worked with AVRs and MSP430s, but this is true for both of them. After compiling and statically linking, my final ELF binary is around 208kB and the Intel Hex binary is about 41kB. AVRDUDE tells me it's uploading about 18kB. What's…
Andrew
  • 366
  • 2
  • 21
10
votes
2 answers

How to pass a compile flag to cmake initial compiler test?

I'm trying to use CMake for building a project which uses the MSPGCC cross-compiler for a MSP430 microcontroller. To successfully compile any simple program with it, we need to pass a compile flag indicating the target processor, or else it fails…
Claudio
  • 2,191
  • 24
  • 49
9
votes
5 answers

Does "static/extern uint8_t array[2] = {0};" conform to the ANSI C specification?

I've a question regarding the following code: #include "all_needed.h" static uint8_t array[2] = {0}; void main(void) { ... } Is a (module) global array allowed to be initialized as above for having each member set to zero while being ANSI C…
Tild
  • 153
  • 1
  • 6
9
votes
4 answers

How to prevent "partial write" data corruption during power loss?

In an embedded environment (using MSP430), I have seen some data corruption caused by partial writes to non-volatile memory. This seems to be caused by power loss during a write (to either FRAM or info segments). I am validating data stored in…
schumacher574
  • 1,081
  • 1
  • 14
  • 32
9
votes
4 answers

Why int is preffered rather than (unsigned) char for small integers in MSP430-GCC

In the msgpcc (GCC for MSP430 microcontrollers) manual authors wrote: Use int instead of char or unsigned char if you want a small integer within a function. The code produced will be more efficient, and in most cases storage isn't actually…
user1150105
8
votes
2 answers

Print value of variable in GDB while debugging msp430

I am using GDB to debug my msp430. I connect the target and then load the binary of program and then "continue". My program is working fine however I want to see certain values of variables in real time. Actually I want to check the time stamp of my…
Hassan
  • 113
  • 1
  • 1
  • 8
7
votes
1 answer

Is there any way of doing multiprecision arithmetic(with integers that are greater than 64-bit) in msp430?

I'd like to know if there is any way, if possible any simple way, to do arithmetic with integers that are larger than 64-bit in size on MSP430? I'm asking this specifically because I'm trying to implement encryption algorithms (RSA, AES, hash…
Nae
  • 14,209
  • 7
  • 52
  • 79
7
votes
2 answers

My embedded application never finishes init to get to main() due to watchdog (IAR/MSP430)

I'm using an MSP430 chip with 10K of RAM. If I go above 5k of RAM usage, it's never capable of making it to main(). The init code calls __data20_memzero to clear out the used RAM space. It look like it increments through memory and clears bytes…
reza
  • 1,329
  • 2
  • 22
  • 37
6
votes
3 answers

Zlib compression on MSP430

Has anyone attempted using zlib compression on an MSP430? Do you have any advice on how to compile to library for use in an MSP430 project (I am using IAR Embedded Workbench)?
6
votes
5 answers

C language: #DEFINEd value messes up 8-bit multiplication. Why?

I have the following C code: #define PRR_SCALE 255 ... uint8_t a = 3; uint8_t b = 4; uint8_t prr; prr = (PRR_SCALE * a) / b; printf("prr: %u\n", prr); If I compile this (using an msp430 platform compiler, for an small embedded OS called contiki)…
Rabarberski
  • 23,854
  • 21
  • 74
  • 96
1
2 3
42 43