Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by arheops

  1. lowpower sleep can be done by following: void mdelay(uint32_t milliseconds) { WDTCTL = WDT_ADLY_1_9; // WDT triggered from ACLK after ~6ms, millis() will be skewed BTW uint32_t wakeTime = milliseconds/5; while(wakeTime>0){ wakeTime--; /* Wait for WDT interrupt in LMP3 */ __bis_status_register(LPM3_bits+GIE); } WDTCTL = WDT_MDLY_0_5; // WDT back to original Energia setting, SMCLK 0.5ms/IRQ } it not very accurate, but enought for most cases. watchdog interrupts supplied by energia ide. p.s cod
  2. hi for CCS code is: ADC10CTL1 = INCH_11; // AVcc/2 ADC10CTL0 = SREF_1 + ADC10SHT_2 + REFON + REF2_5V + ADC10ON + ADC10IE; ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start __bis_SR_register(CPUOFF + GIE); // LPM0, ADC10_ISR will force exit ADC10CTL0=0x0; return ADC10MEM; Can anyone give me some direction of how to do same for energia?
  3. thank you very much for your suggestion. following replace of delay work ok: void mdelay(uint32_t milliseconds) { WDTCTL = WDT_ADLY_1_9; // WDT triggered from ACLK after ~6ms, millis() will be skewed BTW uint32_t wakeTime = (milliseconds*10)/51; while(wakeTime>0){ /* Wait for WDT interrupt in LMP0 */ wakeTime--; __bis_status_register(LPM3_bits+GIE); } WDTCTL = WDT_MDLY_0_5; // WDT back to original Energia setting, SMCLK 0.5ms/IRQ } it not very accurate, but ok. note, there are no need in timer interr
  4. yes, but with that i also have use my own trigger. energia in delay just re-set to lpm0
  5. thanks,will try patch it. yes, i am triing figuring out how to change timer in energia to VLO and after that return it back without power saving it get near 0.9mA,that is too much. ps got 0.50mA by patching wiring.c to start at 8mhz. unfortanly at 2mhz nrf just not work.
  6. can you please explain where/how patch serial port? or i just have wait next energia release?
  7. ignore that. it still compile it with serial becuase there is one call to serial not commented. without serial it work ok(but still not work after power saver mode)
  8. no. that is nto bug i reported. i removes serial. okay. here is code: void setup() { //Serial.begin(9600); //Serial.println('1'); SPI.begin(); SPI.setDataMode(SPI_MODE0); SPI.setBitOrder(1); // MSB-first //Serial.println('2'); radio.begin(); // Defaults 1Mbps, channel 0, max TX power Serial.println(radio.radioState()); radio.setSpeed(1000000); radio.setTXaddress((void*)txaddr); } void loop() { radio.begin(); radio.setTXaddress((void*)txaddr); radio.print(str_on); radio.flush(); // Force transmit (don't wait for any more data) radio.deepsleep();
  9. see code above. if i do .deepsleep(), after that any flush NOT work. it work ONLY if i do begin again.
  10. bug: code without radio.begin(); radio.setTXaddress((void*)txaddr); not work after radio.deepsleep(); so it not work like you say(auto-wakeup on flush)
  11. it can be set like this : in sensor send, get ack, go sleep 100ms, after that go receive for 20-40ms. on RX side you set sending mode(probably using other nrf module if you have more then one sensors, set retransmit to minimum, start transmit.that way nrf will do transmition when remote sensor go online for receive.
  12. There WAS problem in wakeup nrf after lm3 sleep when i tested it last time. looks like spi go off after that. same issue if go to 2mhz mode. but anyway even current power consumption is low enought, i will play with modes letter. my transiver use 18mA when in RX mode. but i am thinking about just start it to rx for 50ms after send packet. so on server side it do send instruction 20 ms after it get packet. working for 50ms/per every 10 second will give enought low power. yes, i understand that RX take power. but RX side will be connected to wifi,so it need power anyway. while tx part have
  13. Thank you, that allow detect issue. Here is color scheme of how to connect wires to balck nrf module(first phone it 2 side of nrf, second one is msp430) https://picasaweb.google.com/arheops/Nrf24L01 looking forward for more options. Actualy best variant i am looking is: turn on to 16mhz,setup radio, send packet, change to read, read response from main node, go power saving radio, go 32khz,go LM3 mode, wait Xsec, radio wakeup&send packet(that can be used to create solar powered sensor network) But your current code already huge breakout in code complexity decrease. Checking sl
  14. i just have tried with 2 brand new nrf modules &new launchpads. set all wires like you say,not changed code. it not work( swapped mi/mo,same result
  15. yes, i setup like that except i put CE,CSN,IRQ to 1_4, 2_0,2_1 and not got any result. so i see no way how ot determine if my nrf module broken or ur code not work for me, thats why i am asking for some feedback from your Begin() code. i am using black module, it have gnd&vcc on top http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo
  16. Hi Can you please send scheme or picture of how to connect nrf24l01+ device to msp430? Or add that on github. Also will be nice to get some feedback to serial port in examples. It is hard determine if I have connected it ok or not, so i not success use your lib((
  • Create New...