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

Pages: [1] 2 3 ... 10
1
NXPTM M522XX, KINETIS and i.MX RT / Compiler Issue
« on: January 14, 2024, 01:29:59 PM »
Hi
  I understand this isnt a processor issue, but wonder if someone else has come across this before , and hopefully found a fix.

I am using Codewarrior 7.1 on Windows 10, and been working well for a few years now. But for some reason during debugging it doesnt display the variable values correctly. For some reason it simply repeats the variable name, see the attached.

Best Regards
Neil

2
NXPTM M522XX, KINETIS and i.MX RT / UDP socket buffer size
« on: November 10, 2023, 02:56:45 PM »
Hi Mark
  Hope you are keeping well...

Where do I find max buffer size of a received UDP packet?  My application can transmit 1k of data and want to make sure the buffer is large enough to hold this

Best Regards
Neil

3
NXPTM M522XX, KINETIS and i.MX RT / Closing and reopening handles
« on: June 21, 2023, 10:51:30 AM »
Hi Mark,
  Hope you are keeping well..

I call the below to open a Uart and pulse input channels. If I want to call the routine again, do I have to close any handles first? If so how is this done?

Best Regards
Neil

--------------------------

TTYTABLE tGSMInterfaceParameters;                                       // table for passing information to driver
QUEUE_HANDLE fnSetGSMSerialMode(unsigned char ucDriverMode)//
{
    GPTIMER_SETUP gptimer_setup;                                         // interrupt configuration parameters
    tGSMInterfaceParameters.Channel = 1;                            // set UART channel for serial use
    tGSMInterfaceParameters.ucSpeed = SERIAL_BAUD_115200; // baud rate
    tGSMInterfaceParameters.Rx_tx_sizes.RxQueueSize = 400;       // input buffer size
    tGSMInterfaceParameters.Rx_tx_sizes.TxQueueSize = 800;       // output buffer size
//    tGSMInterfaceParameters.Rx_tx_sizes.TxQueueSize = 3000;       // output buffer size Large size as may be used with diagnostics
   
    tGSMInterfaceParameters.Task_to_wake = TASK_GSM;                        // wake self when messages have been received
    tGSMInterfaceParameters.Config = (CHAR_8 | NO_PARITY | ONE_STOP | CHAR_MODE | RTS_CTS |  INFORM_ON_FRAME_TRANSMISSION);
 //   tGSMInterfaceParameters.ucDMAConfig = 0; // NO DMA for UART1

    gptimer_setup.int_type = GPT_TIMER_INTERRUPT;
    gptimer_setup.int_handler = DCDPulse_int;
    gptimer_setup.channel = 1;                                           // general purpose timer channel 1
    gptimer_setup.int_priority = GPTIMER0_INTERRUPT_PRIORITY;            // define interrupt priority
    gptimer_setup.mode = GPT_CAPTURE_RISING_EDGE; // set up capture mode and define the timer clock
                                                                     
    gptimer_setup.usCaptureCount = 0;                         // request this many capture values to be recorded before calling our interrupt
    gptimer_setup.capture_list = 0;                          // the capture list for saving to
   fnConfigureInterrupt((void *)&gptimer_setup);                        // enter interrupt for DMA timer test
    if ((GSMPortID = fnOpen( TYPE_TTY, ucDriverMode, &tGSMInterfaceParameters )) != 0)
     { // open or change the channel with defined configurations (initially inactive)
        fnDriver( GSMPortID, ( TX_ON | RX_ON ), 0 );                  // enable rx and tx
      if (tGSMInterfaceParameters.Config & RTS_CTS) {                   //

            fnDriver( GSMPortID, (MODIFY_INTERRUPT | ENABLE_CTS_CHANGE), 0 ); // activate CTS interrupt when working with HW flow control (this returns also the present control line states)
            fnDriver( GSMPortID, (MODIFY_CONTROL | SET_RTS), 0 );     // activate RTS line when working with HW flow control

        }
     }
         
    return GSMPortID;     
}

4
Hi Mark,
  I have 1 socket setup for UDP server and client, is this okay to do, or am I better having 1 socket as a server and one as sending?   My sequences is as follows:

Create 1 UDP socket and setup a listening routine.

Every 10 seconds:

1. Send a request to the device.
2. It then replies with a result.

Very occasionally the device I am talking to stops responding, even though the commands are sent. If I switch on/off my board it all works again. The way around this is I call "fnReleaseUDP_socket" , then re-initialise it again, and all goes well. But now after a good while I get a hardware fault. I thought it might be a memory issue but cant find anything.

So I am not sure if I have to create a socket for sending, and one for receiving? And if releasing and re-initialising the socket can cause an issue?

Best Regards
Neil

5
NXPTM M522XX, KINETIS and i.MX RT / UDP and TCP server
« on: March 16, 2022, 03:52:46 PM »
HI Mark,
  Hope you are keeping well  :)

In my project I have to include a UDP and TCP server . I use the TCP client often, but never as a server. Is there any examples for both UDP and TCP server ?

Best Regards

Neil

6
utFAT / Latest Version
« on: January 01, 2022, 03:14:20 PM »
Hi Mark,
  Happy new year... And hope 2022 is good :)

  looking at the version of my ufat I see its:  11.07.2014 utFAT2.0   . Is this the latest version? If not how can I update this?

Best Regards
Neil


7
Hi Mark
   I have a new board with a MCF52259 processor (same as I have used for years), but this one is crashing at he below function (I have removed here the other instructions and left the one causing the issue.:

extern void fnInitialiseRND(unsigned short *usSeedValue)                 // {84}
{
    if ((*usSeedValue = *ptrSeed) == 0) {                                // we hope that the content of the random seed is random after a power up
        *usSeedValue = 0x127b;                                           // we must not set a zero - so we set a fixed value
    }                                                                    // after a reset it should be well random since it will contain the value at the reset time

}

As soon as I go into the line:    if ((*usSeedValue = *ptrSeed) == 0) {   

I get an undefined interupt:

static __interrupt__ void undef_int(void)
{
    while (1) {}                                                         // wait here and analyse with debugger....
}

Any pointers what can cause this?

Best Regards
Neil

8
NXPTM M522XX, KINETIS and i.MX RT / boot up issues
« on: April 17, 2020, 08:31:41 PM »
Hi Mark
  I have been using utasker on my MC52259 boards for years and most of the time it works no problem.  I am using a fundamental 48 mhz crystal (ABM7-48.000MHZ-D2Y-F-T ) 18pf with  load  capacitors both being 33pf, and a 1M parallel resistor. Both CLCKMOD[1,0] pins are 0v, with XTAL=3.3v (through a pullup) . Occaionally I cant even program some boards . So I tried setting CLCKMOD[1,0] to 3.3v and leave off pullup with XTAL connection. This programs and if I run this , then it works fine, but if I try to debug the application the line
 MCF_CLOCK_SYNCR = ((((PLL_MUL - 4)/2) << 12) | CLKSRC | PLLMODE | PLLEN | (POST_DIVIDE << 8)); // set up PLL to generate the required frequency 
causes an illegal command error from cpu.  Any idea why this would happen?

Best Regards
Neil


9
NXPTM M522XX, KINETIS and i.MX RT / mcf52259 RTC
« on: February 09, 2020, 06:23:18 PM »
Hi Mark
   I am thinking of using the onboard RTC instead of an external one. I see in the file M5223X.c file you have support for it. Is there any examples on how to use this with utasker? I want to read/set time and use the 1 Hz interupt.

Best Regards
Neil

10
NXPTM M522XX, KINETIS and i.MX RT / Strange UART operation
« on: February 03, 2020, 05:56:10 PM »
Hi Mark
  I am using the MCF52259 chip and been running the UART without any problems. I have been running at various speeds and parity, but I am communicating with a device that requires 9600N82  (2 stop bits).  I have only every had to set 1 stop bit,  so I set the config setting to :

tInterfaceParameters.Config = (CHAR_8 + parity + stop_bits +  CHAR_MODE);

where parity=0 and I set stop_bits to 0x20 . This worked well , but then I noticed that the stop bits value should have been 0x10. Since changing this to 0x10 it doesnt communicate properly. Looking at the registers the UMR12 and UMR22 is set to 0x7, indicating no parity with stop bits modified. When I set it to 0x10 (as it should be), both UMR12  and UMR22  are both set to 0xf .  Indicating multidrop in UMR11 and stop bit length of 0xf .  I thought it would be 2 for no parity? 

I can communicate with the device from my PC application with setting the serial port to 2 stop bits.  And to make it more strange. I can communicate  with my pc application from the mcf52259 by setting the stop_bits to 0x10.

Best Regards
Neil





11
µTasker general / Converting utasker on Codewarrior 7.2 to latest version
« on: September 19, 2019, 03:16:22 PM »
Hi Mark
  I have been using utasker on codewarrior V7.2 on an old windows XP machine for years, and as the machine is not working I want to run it on the latest nxp codewarrior on Windows 10. How do I update my utasker files to operate on the latest codewarrior on Windows 10 ? And what version of codewarrior will it run on?  I am using the coldfire m52259 chip.

Looking at the list of development software (as attached) Im not sure which one to download.

Many Thanks
Neil

12
utFAT / latest version
« on: December 04, 2017, 03:01:58 PM »
Hi Mark,
  My current project is seeing a 8GB micro sd card as 4GB. Looking at the mass_storage.h header , it has :

   05.08.2014 Correct long file rename end of directory save            {1}
    15.08.2014 Corrected =! to !=                                        {2}
    29.08.2014 Correct creating additional directory clusters            {3}
    03.09.2014 Remove fnCreateFile(), fnSetFileLocation() and fnInsertLFN_name() parameter {4}
    03.09.2014 Reset any deleted location markers when moving to next paragraph {5}
    06.10.2014 Correct brackets in fnExtractLongFileName()                {6} [uFATV2.01]
[1] changes for formatting cards that previously didnt format.  . I think this was an update you gave me.


I tried copying over the files from the utasker demo that works, but got a heap of errors, see attached. 

As my own project is working well, I dont want to change over to a complete new utasker, I would like to just update the  mass_storage part.

Many Thanks
Neil

13
Hi Mark,
  I have been using CodeWarrior for Coldfire version 7.1 for years and I think I would like to move to the latest version. Is there any documents on how to convert my current projects of utasker to the latest version?

Many Thanks
Neil

14
µTasker general / Adding a delay without using a task
« on: October 09, 2017, 04:01:50 PM »
Hi Mark,
  I wish to have a function to simply have a delay before jumping to the next line. I have the below for adding a milli or micro second delay. How many channels in the timer are there used by utasker? Im using channel 1 , but dont know if there are others available.

Below I call the Delayms(.) for a delay, do you see any issues doing this?

Regards
Neil


volatile char DelayTimeout;
void Delayms(int Delay)
{
    DelayTimeout=0;
    SetOneShotTimerG2(Delay,1);
    while(!DelayTimeout)
      ;
}

void G2TimerProcedure(void)
{
  DelayTimeout=1;
}
 
void SetOneShotTimerG2(int Tme,char IsMS)
{
   DMA_TIMER_SETUP timer_setup;
   timer_setup.int_type = DMA_TIMER_INTERRUPT;                       
   timer_setup.channel = 1;          // timer channel
   timer_setup.int_priority = DMA_TIMER1_INTERRUPT_PRIORITY;
   timer_setup.int_handler = G2TimerProcedure;                // enter timer call-back
   timer_setup.mode = (DMA_TIMER_INTERNAL_CLOCK | DMA_TIMER_SINGLE_SHOT_INTERRUPT);
   if(IsMS)
    timer_setup.count_delay = DMA_TIMER_MS_DELAY(1,1,Tme);   
   else
    timer_setup.count_delay = DMA_TIMER_US_DELAY(1,1,Tme);   
   
   fnConfigureInterrupt((void *)&timer_setup);    
}

15
µTasker general / USB -> Serial Driver for Windows 8 & 10
« on: October 06, 2017, 02:55:33 PM »
Hi
  Does anyone know if there is a stable USB -> Serial driver for Windows 8 & 10? I wish to use the USB port to connect to a serial port on the PC

Regards
Neil

Pages: [1] 2 3 ... 10