Jump to content

dcjw

Members
  • Content Count

    8
  • Joined

  • Last visited

  1. Hi I would like to utilize LPDS mode for CC3200. I am following TI SDK idle_profile_nonos example. However, since my code was developed in Energia environment, I am trying to add PM related functions into my code. However, it doesn't enter sleep mode. Here is what I did. I really appreciate if anyone who is familiar with LPDS can share their experience. One issue I can think of now is, according to TI, they mentioned that we need to set up SimpleLinkSyncWaitLoopCallback to put MCU to sleep when it is idle. However, I am not sure how SimpleLinkSyncWaitLoopCallback is invoked in Energia http://e2e.ti.com/support/wireless-connectivity/wifi/f/968/p/769004/2848594#2848594 1. I am using Energia IDE to develop my code. In setup(), I include PM Initialization struct platform_pm_ops lp3p0_pm_ops; /* Initialize the PM framework */ if (cc_pm_framework_init()){ Serial.println("Error: PM framework init failed"); while(1); } /* Get the SOC specific platform operations */ lp3p0_get_pm_ops(&lp3p0_pm_ops); /* Register PM ops with framework */ if(cc_pm_platform_ops_register(&lp3p0_pm_ops)){ Serial.println("Error: PM framework init failed"); while(1); } /* Register the interrupt with the global interrupt handler */ MAP_IntRegister(INT_PRCM, prcm_interrupt_handler); /* Enable the interrupt */ MAP_IntEnable(INT_PRCM); 2. In loop(), if GP28 is LOW, then I do the following if (sl_WlanPolicySet(SL_POLICY_PM, SL_NORMAL_POLICY, NULL, 0) < 0) { Serial.println("Error: unable to configure network power policy\n\r"); while(1);//LOOP_FOREVER(); } // set up gpio handler lp3p0_setup_power_policy(1); // 0: POWER_POLICY_SLEEP; 1: POWER_POLICY_STANDBY // just to clear any pending event _SlNonOsMainLoopTask(); set_gpio_as_wk_src(0, 0x3, 0); // WK_LPDS = 0x0, GPIO_SRC_WKUP = 0x3, PRCM_LPDS_HIGH_LEVEL = 0x0 cc_idle_task_pm(); 3. The functions above are directly from lp3p0_plat_ops.c. However, since I only want to use GPIO as the wake up source, I modify the interrupt handler as follows void prcm_interrupt_handler() { int status; /* Read the interrupt status, also clears the status */ status = MAP_PRCMIntStatus(); if (0 == status) { /* Invoke the wake from LPDS interrupt handler */ wake_interrupt_handler(); } else { } } 4. Since my wake up source is GPIO, I comment out Host IRQ and RTC portions in set_wkup_srcs May I know if I am missing anything else? Thanks, Dennis
  2. Got it, thanks for the lead. I will check them out
  3. I came across this on Github. May I confirm if LPDS is now supported in Energia? https://github.com/energia/Energia/issues/623 Is there a sample code that we can refer to? Thanks, Dennis
  4. Hi Rei, I am not quite familiar with the syntax for linker. It seems like I just need to change the length like the following. May I run by you if this is the only place to be modified or is there other place require update as well? Thanks! MEMORY { SRAM (rwx) : ORIGIN = 0x20004000, LENGTH = 0x00040000 }
  5. I see. May I know where is the linker script and how to modify it?
  6. I am using rev4.1 board, so it has 256kB RAM. Can Energia IDE automatically determine what type of board and how much RAM I am using?
  7. From the compiler output, it seems like the max space is 196KB. Is it possible to increase it to 256KB? Thanks!
  8. Hi I am developing a program for CC3200. The global variables in my program consumes quite an amount of space. As I continue to develop, I foresee there will be more space required. I am seeing the following from Energia compiler output. CC3200 has 1MB Flash. Both .text section and .bss section take 196KB. It seems like there is still space available. Is it possible to change the loader configuration to extend the address space of .bss section? "Sketch uses 35440 bytes (18%) of program storage space. Maximum is 196608 bytes. Global variables use 167124 bytes (85%) of dynamic memory, leaving 29484 bytes for local variables. Maximum is 196608 bytes. Low memory available, stability problems may occur." Thanks, Dennis
×