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
3
votes
4 answers

Atomically overwrite a pointer

I have found similar questions to the one I have (i.e. Is changing a pointer considered an atomic action in C?), but I have not been able find anything that gives me a definitive yes/no answer when it comes to writing a pointer. My problem is thus.…
HXSP1947
  • 1,311
  • 1
  • 16
  • 39
3
votes
1 answer

CMP and carry flag

Processor: MSP430 16 bit RISC Can someone explain the CMP instruction in terms of when the carry flag is actually set below. From the manual it says, CMP(.B) src,dst ..... dst - src If src is not equal to dst, will the carry flag be set? cmp r15,…
user7532311
3
votes
1 answer

Bit manipulation intrinsics using GCC for MSP430

The MSP430 series microcontrollers provide fast bit set / bit clear machine instructions. These bit manipulation comamnds are useful for some register or I/O manipulations that have side effects or need atomic access to prevent glitches or race…
dronus
  • 10,774
  • 8
  • 54
  • 80
3
votes
2 answers

what does mean by __even_in_range(UCA0IV,0x08)

I found this part from the example code for UART for MSP430FR57xx from TI. I don't understand what __even_in_range(UCA0IV,0x08) does mean? #pragma vector=USCI_A0_VECTOR __interrupt void USCI_A0_ISR(void) { switch(__even_in_range(UCA0IV,0x08)) …
3
votes
1 answer

C - How to receive from the serial port for the device side (z1 mote)

I am trying to communicate with a z1 mote that is connected to my PC directly by using pyserial. What I am looking to do is to write to the mote, and upon receiving the command, the mote should reply the current reading for temperature, for example.…
Ahmed Al-haddad
  • 805
  • 2
  • 16
  • 41
3
votes
1 answer

MSP430: __delay_cycles() is slow/MCLK might be slow

I am afraid there may be something wrong with my MSP430F5529 launchpad because I can't get __delay_cycles to behave properly. It always use to work fine but now suddenly seems to have an issue. I would just use a timer module to cause a delay but…
3
votes
2 answers

Do padding bits need to be preserved?

The MSP430X architecture is an extension of the 16 bit MSP430 architecture to a 20 bit address space. This is done by expanding the processor's registers to 20 bit, keeping the least addressable unit at one octet (CHAR_BIT equals 8). On this…
fuz
  • 88,405
  • 25
  • 200
  • 352
3
votes
1 answer

UART for MSP430FR5969

I'm new for using MSP430FR5969. I want to program my uart1 to connect the bluetooth PAN1026 with my MSP430. at the begining I send a rest mode { 0x01, 0x03,0x0c,0x00 } and the bluetooth must answer me { 0x04,0x0e,0x04,0x04,0x03,0x0c,0x00 } So I…
3
votes
1 answer

Compiling relic library (for msp430)

I'm trying to compile relic in order make some simulations on COOJA. For your information I am using COOJA in a virtual machine ( Instant contiki 2.7 ), It comes with msp430-gcc-4.7.0 I ran the following commands ( according to the…
yushaa yave
  • 145
  • 1
  • 9
3
votes
1 answer

What's an efficient way to round a signed single precision float to the nearest integer?

float input = whatever; long output = (long)(0.5f + input); This is inefficient for my application on an MSP430, using the compiler-supplied floating point addition support library. I'm musing that there may likely be a clever 'trick' to this…
IanJ
  • 467
  • 7
  • 15
3
votes
4 answers

Every SPI send results in receiving a 0 on MSP430

I run this simplified program for SPI communication, running on the TI MSP430FR5969 on its corresponding launchpad MSP-EXP430FR5969, and set breakpoints just before TX and just after RX in CCS (Code Composer Studio). The breakpoints are labelled…
necromancer
  • 23,916
  • 22
  • 68
  • 115
3
votes
1 answer

FreeRTOS configTICK_RATE_HZ

I am using an MSP430f5438 with version 5.4 of FreeRTOS. I am having a funny problem that I can't figure out. Basically, when I set configTICK_RATE_HZ to different values, the LED blinks faster or slower; it should stay the same rate. It blinks…
michael
  • 2,577
  • 5
  • 39
  • 62
3
votes
1 answer

way to calculate crc for msp430f5438a using inbuilt function

i have gone through CCITT and TI's Document regarding msp430. Is it possible to calculate CRC for MSP430F5438A using any in built function? Or do i have to calculate CRC for each data taken.
PG2706
  • 41
  • 5
3
votes
1 answer

How to assign a variable pointer to access hardware register on msp430?

For context I'm using the mspgcc and the msp430g2553 on the launchpad development board. I want to create a pointer that can point to various hardware registers. The standard header provides access to the registers through statements like…
tylerjw
  • 802
  • 4
  • 14
  • 28
3
votes
0 answers

How to read/write to a HID device?

#include #include #include My HID device shows up as dev/usb/hiddev0. I can successfully open() the device with fd = open("/dev/usb/hiddev0", O_RDWR); And generate correct device reports by printing the…
Fritz Huie
  • 41
  • 1
  • 5