AnsweredAssumed Answered

K60, UART and Low Power Interrupt enabled, but UART not responding to fopen - help!

Question asked by Brian Paterson on Mar 8, 2014
Latest reply on Mar 18, 2014 by Brian Paterson

Hi - this problem may be answered elsewhere, but I'm totally stumped.


Before I enabled the low power modes....I had the ittyb channel open and functional - so I can read and write data at 19200 baud to the external device.

Now, I need to set the sleep or low power modes so that the battery doesn't die on me.

Oh yes - I read the issues with the ittyd and ittyf - but they are enabled and used - ittyf for the debugging and ittyd for my GPS (read only)

I'm using the K60_1M0_120 144pin device.

Software is Keil 4.0.2.2 and as I had issues with the conflict on the low power/serial before, it is a clean install.


From the user_config.h, as well as the ittyb, d, f being enabled,are the following and I wonder if there is a conflict:

#define BSPCFG_ENABLE_FLASHX 0
#define BSPCFG_ENABLE_ESDHC  1
#define BSPCFG_ENABLE_IODEBUG1

#define BSPCFG_ENABLE_NANDFLASH  1

#define BSPCFG_ENABLE_USBDCD 0
#define BSPCFG_ENABLE_CRC    0
#define BSPCFG_HAS_SRAM_POOL 1
#define BSPCFG_ENET_SRAM_BUF 1
#define MQX_USE_IDLE_TASK           1
#define MQX_ENABLE_LOW_POWER        1
#define MQXCFG_ENABLE_FP            1

#define MQX_INCLUDE_FLOATING_POINT_IO   1

#define MQX_TASK_DESTRUCTION 1
#define MQX_USE_TIMER   1
#define SHELLCFG_USES_MFS   1

#define BSPCFG_ENABLE_IO_SUBSYSTEM    1

#define MQX_USE_SEMAPHORES   1
#define MQX_HAS_TIME_SLICE   1
#define MQX_USE_LOGS   1

#define BSP_DEFAULT_IO_CHANNEL_DEFINED

#define BSP_DEFAULT_IO_CHANNEL "ttyf:"

#define USBCLASS_INC_PRINTER

#define BSPCFG_ENABLE_ADC   1
#define BSPCFG_ENABLE_LWADC    1

#define BSP_ADC_POTENTIOMETER 

 

From my code:

    fh_ptr = uart_init(19200,"ittyb:");

which calls:

   fd = (pointer)fopen(device, BSP_DEFAULT_IO_OPEN_MODE);

and totally locks in the SER_INT.C routine at line 294:

     (*int_io_dev_ptr->DEV_IOCTL)(int_io_dev_ptr->DEV_INFO_PTR, IO_IOCTL_SERIAL_SET_FLAGS, &ioctl_val);

 

It runs into either the mqx idle routine or I've caught it in some assembler code looking at the interrupt structure, which appears empty???

The low power mode just before the lock-up is "LPM_OPERATIONAL_MODE_RUN".

I'm locking an interrupt somewhere, but I cannot figure out which one or how to discover the held link for myself.

Any thought would be appreciated!

 

Brian

 

P.S. - I just saw the default device as "ttyf:". I'll fix it....

Outcomes