Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - akorud

Pages: [1] 2
1
NXPTM M522XX, KINETIS and i.MX RT / IIC - wake task on write complete
« on: December 30, 2009, 05:33:23 PM »
Hi, I'd like to use task activation on IIC write complete - for performing long writes which do not fit in TX buffer and must be performed sequentially.
According to documentation it's possible - just assign task to tIICParameters.Task_to_wake field.
However I cannot make it work - did I miss something?

Thanks in advance,
Andriy

2
NXPTM M522XX, KINETIS and i.MX RT / USB, GCC and bootloader
« on: August 18, 2009, 02:57:01 PM »
Hi, the next problem I have is the following: compiling my USB application (USB code is unchanged bare uTasker) with GCC everything works fine if application is loaded at address 0x00. If I change it to be loaded at 0x1000 (SPI bootloader) application itself works fine but just after USB connect it hangs and system is restarted by watchdog.
I change only linker script from
Code: [Select]
MEMORY
{
  rom (rx) : ORIGIN = 0x0000, LENGTH = 256K
to
Code: [Select]
MEMORY
{
  rom (rx) : ORIGIN = 0x1000, LENGTH = 252K
I'm still trying to investigate the problem but maybe you can point me, maybe there is hardcoded address somewhere in USB code...

Thanks in advance,
Andriy Korud

3
NXPTM M522XX, KINETIS and i.MX RT / Interrupt handler, GCC
« on: August 17, 2009, 04:07:00 PM »
Hi,
I'm setting interrupt handler using uTasker functionality:
Code: [Select]
INTERRUPT_SETUP interrupt_setup;
interrupt_setup.int_type     = PORT_INTERRUPT;   
interrupt_setup.int_priority = (INTERRUPT_LEVEL_3);
interrupt_setup.int_handler  = irq_handler;                           // handling function
interrupt_setup.int_port_bit = 3;                                    // The IRQ input connected
interrupt_setup.int_port_sense = IRQ_RISING_EDGE;                    // Interrupt on this edge
fnConfigureInterrupt((void *)&interrupt_setup);           
code is compilted with GCC. Do I need to add
Code: [Select]
__attribute__((interrupt_handler)) to my handler function?

4
µTasker general / Proper task state for UART reading
« on: May 29, 2009, 03:36:00 PM »
Hi, maybe this is really simple question, but:
what is the proper state for task that only read data from UART? UTASKER_GO or UTASKER_STOP?
The task function looks like
Code: [Select]
if (debug_task_state == STATE_INIT) {
debug_uart_init();
debug_task_state = STATE_RUN;
}
while (fnRead(PortIDInternal, ucInputMessage, HEADER_LENGTH)) {
fnRead(PortIDInternal, ucInputMessage, ucInputMessage[MSG_CONTENT_LENGTH]); // flush any unexpected messages (assuming they arrived from another task)
}

if (SerialPortID != 0 && (uart_rx_len = fnMsgs(SerialPortID))) {
while ((uart_rx_len = fnRead(SerialPortID, ucInputMessage, MEDIUM_MESSAGE)) != 0) {
console_cmd_receive((char*)ucInputMessage, uart_rx_len);
}
}
I'm not sure if data on UART will activate and schedule the task.

5
NXPTM M522XX, KINETIS and i.MX RT / MCF52223 SPI: hangs on register access
« on: December 17, 2008, 06:18:20 PM »
Hi,
I've just noticed that my MCF52223 hangs on any (read or write) access to QSPI registers (i.e. QMR, QAR). Compiled with CW7.1. Even tried access via *(IPSBAR + 0x340) - the same effect - immediate hang.
Any ideas anybody?

regards,
Andriy

P.S. I've even checked part type via CIR register - it's actually 52223, so SPI should be there. (Some times ago Freescale send us chips with wrong silicon inside).

P.P.S. But I can access (and read correct default values) that register with BDM ("Hardware diagnostics") in CW.
For example:
Code: [Select]
Read  0x0104 at address: 0x40000340
Read  0x0404 at address: 0x40000344
And compiler-generated instruction also look ok:
Code: [Select]
movew 40000340 <___IPSBAR+0x340>,%d0

6
NXPTM M522XX, KINETIS and i.MX RT / MCF52223 - phantom PORT TD?
« on: December 15, 2008, 04:32:58 PM »
Hi,
does anybody know anything about this phantom port? In GPIO description in chapter 12.1 of RM there is port TD and pins PTD[1-3], uTasker also has defines:
Code: [Select]
#define PTDPAR      *(unsigned char *)(PORT_MODULE_ADD + 0x70)    // bur that's all. No information in chapter 12.5.1 Ports Memory Map, no in pinout. I'm really confused.

Best regards,
Andriy Korud

7
NXPTM M522XX, KINETIS and i.MX RT / Dot-matrix LCD: interface and GUI
« on: December 01, 2008, 09:19:45 PM »
Hi,
does anybody have an experience with implementing simple GUI on dot-matrix LCD (128x64 or 128x128) with common-used 8-bit parallel interface? Any tips, sample code, functions for drawing graphics primitives and fonts would be appreciated.

Best regards,
Andriy Korud

8
µTasker general / No responce from ARP
« on: November 25, 2008, 12:28:02 PM »
Hi,
during long time I've observing strange situation: randomly you have no response from ARP. What I mean - initiating UDP communication (either TFTP of raw) from the device - neither frame is sent, no ARP_RESOLVED or ARP_RESOLUTION_FAILED event is received. Just nothing happens.
The problem is that it happens randomly and I have no idea how, what and where check or debug.
Any ideas?

Best regards,
Andriy Korud

9
NXPTM M522XX, KINETIS and i.MX RT / Problem with DMA timer and GCC
« on: October 17, 2008, 11:11:35 AM »
Hi, I'm stopped with strange problem - the following code:
Code: [Select]
static void test(void) {
fnDebugMsg("x\r\n");
}

static void node_schedule_write_timer(int delay) {
  DMA_TIMER_SETUP dma_timer_setup;       
  uMemset(&dma_timer_setup, 0, sizeof(dma_timer_setup));
  dma_timer_setup.int_type = DMA_TIMER_INTERRUPT;
  dma_timer_setup.int_handler = test;
  dma_timer_setup.channel = 1;                                         // DMA timer channel 1
  dma_timer_setup.int_priority = DMA_TIMER1_INTERRUPT_PRIORITY;        // define interrupt priority
  dma_timer_setup.mode = (DMA_TIMER_INTERNAL_CLOCK | DMA_TIMER_SINGLE_SHOT_INTERRUPT);
  dma_timer_setup.count_delay = DMA_TIMER_MS_DELAY(1, 1, 5000);
  fnConfigureInterrupt((void *)&dma_timer_setup);                      // enter interrupt for DMA timer test
}
Works fine compiled in CW but hangs on interrupt route exit in GCC. Interrupt route is executed (original interrupt routing is more complicated, I've shrink it for debug purposes). Hang is immediately after exit and the only way of recovery is watchdog reset.
Assembler code:
CW (works):
Code: [Select]
0000bbf8 <_test>:
    bbf8:       41f9 0001 522e  lea 1522e <_@527>,%a0
    bbfe:       4eb9 0000 5e80  jsr 5e80 <_fnDebugMsg>
    bc04:       4e75            rts
and GCC (hangs):
Code: [Select]
000116f8 <test>:
   116f8: 4e56 0000      linkw %fp,#0
   116fc: 4879 0001 8167 pea 18167 <dbm_to_mw_table+0x296>
   11702: 4eb9 0000 6e7c jsr 6e7c <fnDebugMsg>
   11708: 588f            addql #4,%sp
   1170a: 4e5e            unlk %fp
   1170c: 4e75            rts
Does anybody have an idea how can I go further with debugging it? The problem is more than strange because PIT timer and interrupt works fine at the same time.

Regards,
--
Andriy

10
NXPTM M522XX, KINETIS and i.MX RT / Linker script for GCC with bootloader
« on: October 08, 2008, 08:48:11 PM »
Hi,
I've managed to compile my application with GCC 4.2 (code size is smaller then CW6.3 but larger then CW7.1) however I have problem making binary for running bootloader - application silently hangs. 
I suppose that problem is that with bootloader application is loaded at 0x800 and this should be written somewhere in ld script - did anybody experience it?

best regards,
--
Andriy

11
NXPTM M522XX, KINETIS and i.MX RT / GCC 4.2 vs CW 6.3
« on: October 06, 2008, 04:09:33 PM »
Hi,
do anybody have some experience in using GCC 4.2  vs CW 6.3 - I mean code size, compilation quality (CW 6.3 has some optimizer errors), etc? For example I've found that CW 7.0 produce larger code than 6.3.
I consider which one will be better for "release" firmware builds.
best regards,
--
Andriy

12
µTasker general / uTasketConvert sources or algorithm?
« on: September 23, 2008, 11:36:51 AM »
Hi,
is it possible to get this information? Why I need it - I'm trying to build complete Linux-based build environment and is willing to develop cross-platform version of this tool.

regards,
--
Andriy

13
NXPTM M522XX, KINETIS and i.MX RT / Software timer for 100-200ms intervals?
« on: September 21, 2008, 11:04:32 AM »
Hi,
I've just noticed that
Code: [Select]
uTaskerGlobalMonoTimer( (UTASK_TASK)(OWN_TASK | HARDWARE_TIMER), (DELAY_LIMIT)(200 * MILLISEC), E_TIMER_NODE_TIMEOUT );works fine but
Code: [Select]
uTaskerGlobalMonoTimer( (UTASK_TASK)(OWN_TASK), (DELAY_LIMIT)(200 * MILLISEC), E_TIMER_NODE_TIMEOUT );is never fired. Is this normal situation?

Best regards,
--
Andriy Korud

14
Hi,
is there any practical difference (especially in our kind of software) between allocating data structures dynamically in heap and declaring them at compile-time?

regards,
Andriy Korud

15
Hi, I'm trying to use second UART (first is working like a charm) and found out strange behavior:
UART is opened:
Code: [Select]
tInterfaceParameters.Channel = 1;
tInterfaceParameters.ucSpeed = SERIAL_BAUD_9600; // 9600 baud rate
tInterfaceParameters.Rx_tx_sizes.RxQueueSize = RX_BUFFER_SIZE;      // input buffer size
tInterfaceParameters.Rx_tx_sizes.TxQueueSize = TX_BUFFER_SIZE;      // output buffer size
tInterfaceParameters.Task_to_wake = OWN_TASK;                
tInterfaceParameters.usConfig = (CHAR_8 | NO_PARITY | ONE_STOP | NO_HANDSHAKE | CHAR_MODE);

if (InternalUARTPortID = fnOpen( TYPE_TTY, FOR_I_O, &tInterfaceParameters )) {
        fnDriver( InternalUARTPortID, ( TX_ON | RX_ON ), 0 );                  // enable rx and tx
}
send some data:
Code: [Select]
if (fnWrite(InternalUARTPortID, &req, sizeof(req)) != sizeof(req)) {
//fail
}
which works fine and I can confirm data sending with osciloscope. Then as soon as data comes to this serial port execution flow jumps to
Code: [Select]
// default interrupt handler - and undefined interrupts will arrive here
//
static __interrupt__ void undef_int(void)
{
    while (1) {}                                                         // wait here and analyse with debugger....
}
and application is reseted by watchdog.
Any ideas what I'm doing wrong?

Thanks in advance,
Andriy Korud

Pages: [1] 2