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 - cmalan

Pages: [1]
1
µTasker general / send UDP subnet broadcast
« on: February 29, 2016, 04:10:15 PM »
Hi
I am tying to send a udp broadcast to 192.168.0.255, but I don't see it with wireshark. If I use 255.255.255.0 for the IP it does send.
It looks like uTasker is looking for a apr entry for 192.168.0.255.
What must I do to be able to send to this broadcast address

uTasker 1.4
MCF52259

Regards
Christo

2
µTasker general / USB fnWrite not writing all data
« on: October 28, 2013, 02:29:38 PM »
Hi
Why would fnWrite not copy all the bytes to the USB endpoint.
Code: [Select]
if (fnWrite(USBPortID_mcu, 0, 1024) != 0) {     // check that there is space for a block of data

     if(fnMsgs(USBPortID_mcu) != 0) {
         fnDebugMsg("Usb Data ");
         Length = fnRead(USBPortID_mcu, ucInputMessage, BIG_MESSAGE); // read the content
         fnDebugDec(Length,0);
         fnDebugMsg(" bytes in ");
         Length = fnProcessMCUMessage("USB",0,ucInputMessage,Length,ucOutputMessage);
         fnDebugDec(Length,0);
         fnDebugMsg(" bytes to send ");
         if(Length > 0)
             Length = fnWrite(USBPortID_mcu,ucOutputMessage,Length);
         fnDebugDec(Length,0);
         fnDebugMsg(" bytes sent\r\n");
     }
    }
The function fnProcessMCUMessage dont return more than 512 bytes.

Quote
Usb Data 18 bytes in 34 bytes to send 34 bytes sent
Usb Data 18 bytes in 34 bytes to send 34 bytes sent
Usb Data 18 bytes in 34 bytes to send 34 bytes sent
Usb Data 34 bytes in 498 bytes to send 20 bytes sent
Usb Data 34 bytes in 66 bytes to send 66 bytes sent
Usb Data 34 bytes in 498 bytes to send 480 bytes sent
Usb Data 34 bytes in 66 bytes to send 66 bytes sent
Usb Data 34 bytes in 66 bytes to send 66 bytes sent
Usb Data 34 bytes in 498 bytes to send 498 bytes sent
Usb Data 34 bytes in 498 bytes to send 376 bytes sent

The buffer is supposed to have space 1024 bytes but sometimes the 498 bytes dont get sent.

The debug output is from the telnet session.

MCF52259 GNU compiler

Christo

3
utFAT / IRQ on card detect pin
« on: July 18, 2012, 11:54:48 AM »
Hi
On my board i have the card detect pin wired to a IRQ pin (IRQ1 on my 52259).
What should I do in the Interrupt so that the application know that the card is now removed and start the instillation sequence when the card is inserted again.
I know the code can check for removal periodically and retry until a card is detected, but I have the interrupt to work with.

Christo

4
NXPTM M522XX, KINETIS and i.MX RT / Uart RX Dma with break 52259
« on: June 26, 2012, 02:33:40 PM »
Hi
I have a problem with the rx dma on a uart. This is my setup.
Code: [Select]
tInterfaceParameters.Channel = 2; // set UART channel for serial use
    tInterfaceParameters.ucSpeed = SERIAL_BAUD_230400; // baud rate
    //tInterfaceParameters.ucSpeed = SERIAL_BAUD_9600; // baud rate
    tInterfaceParameters.Rx_tx_sizes.RxQueueSize = 40; // input buffer size
    tInterfaceParameters.Rx_tx_sizes.TxQueueSize = TX_BUFFER_SIZE; // output buffer size
    tInterfaceParameters.Task_to_wake = TASK_BACNET; // wake self when messages have been received
    tInterfaceParameters.Config = CHAR_8 | NO_PARITY | ONE_STOP | /*RTS_CTS*/NO_HANDSHAKE |MSG_MODE | MSG_MODE_RX_CNT | MSG_BREAK_MODE;
    tInterfaceParameters.ucDMAConfig = UART_RX_DMA |UART_RX_DMA_HALF_BUFFER |UART_RX_DMA_BREAK /*| UART_TX_DMA*/; // activate DMA on transmission

    if((MstpPortID = fnOpen(TYPE_TTY, FOR_I_O, &tInterfaceParameters)) != 0)
    { // open or change the channel with defined configurations (initially inactive)
        fnDriver(MstpPortID, (RX_ON|TX_ON), 0); // enable rx
        fnDebugMsg("fnInitialise dl port\r\n");
        //fnWrite(MstpPortID,(void*)&tInterfaceParameters,5);
    }

if  tInterfaceParameters.ucDMAConfig is 0 then I can receive my messages.

I added this
Code: [Select]
static __interrupt__ void _DMA2_Rx_handler(void)                         // rx buffer reception completed on SCI1
{
    DMA_SR_BCR2 = DSR_DONE;
        #ifdef _WINDOWS
    DMA_SR_BCR2 &= ~DSR_DONE;                                            // {100}
        #endif
    iInterruptLevel = 1;                                                 // ensure interrupts remain blocked during subroutine
    fnSciRxByte(0, 2);                                                   // tty block ready for read
    iInterruptLevel = 0;
}
to M5223X.c and changed fnConfigSCI to set up dma 2

Did I miss some thing.

Christo

5
utFAT / utFat and uFile
« on: February 03, 2012, 07:55:49 AM »
Hi

Can the sd card and internal flash be accessible from ftp and http at the same time.
I want to store config data on internal flash and write logs to the sd card.

Christo

Pages: [1]