1
µTasker general / Re: send UDP subnet broadcast
« on: March 01, 2016, 08:39:11 AM »
Hi Mark
Thanks, my project is to old, I will have to update.
Christo
Thanks, my project is to old, I will have to update.
Christo
Nov 2020: uTasker i.MX RT V1.4.12 is productive - with complete secure loading concept.
Follow uTasker updates at www.twitter.com/uTasker !!
Online Forum registration has now been disabled. Please send an email to an address at the bottom of the home page with your preferred user name and email address if you would like an account.
Return to uTasker main site: www.utasker.com
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.
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.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
if (ucUseDMA & UART_RX_DMA) {
DMAREQC |= (DMA_UART_2_RX << DMAC_2_SHIFT); // select DMA matrix for Rx on DMA channel 1
PACR_UART2 |= (SUP_USER_FULL_ACCESS << UART2_ACCESS_SHIFT); // enable DMA access to UART1
#ifdef _M520X
IC_ICR_0_9 = (DMA2_INTERRUPT_PRIORITY & LEVEL_MASK); // define interrupt level
#else
IC_ICR_0_11 = DMA2_INTERRUPT_PRIORITY; // define interrupts level and priority
#endif
fnSetIntHandler(DMA2_VECTOR, (unsigned char *)_DMA2_Rx_handler);// enter the handler routine
IC_IMRL_0 &= ~(DMA2_PIF_INT_L | MASK_ALL_INT); // unmask interrupt source
}
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);
}
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