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.


Messages - neil

Pages: 1 [2] 3 4 ... 30
16
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


17
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

18
NXPTM M522XX, KINETIS and i.MX RT / Re: Strange UART operation
« on: February 04, 2020, 05:44:20 PM »
Mark
  After setting the values I had the instruction "*ucReg = UART_RESET_CMD_PTR; ", pointed the pointer to UMR1n ,then read in the registers . Is there anything else I have to do?

Neil

19
NXPTM M522XX, KINETIS and i.MX RT / Re: Strange UART operation
« on: February 04, 2020, 12:08:55 PM »
Hi Mark
  I looked further into this issue, and slightly different the way to access the registers than other processors I have used. 

I see to access the UMR1n and UMR2n registers the reset mode register has to point to the UMR1n. I find it strange that when updating any of the UMR1n or UMR2n, the other register also updates with the same value. I tried the following to write and read to the 2 registers.

after the *ucReg = ucBits; line in your code I added the below so I can step through it.

TmpPtr=ucReg ; //when you accessed the UMR1n register I took a copy of the address.
ucReg = fnSelectChannel(Channel); 
*ucReg = UART_RESET_CMD_PTR; //reset mode register
 ucReg =TmpPtr; //point to  UMR1n
 *ucReg = 2; //place 2 into the register.  In the Register Window the 2 UMR1n and UMR2n changed to 2, which is weird
  *ucReg = 3; //place 3 into the UMR2n register.  In the Register Window the 2 UMR1n and UMR2n changed to 3, again which is weird

//now read the 2 registers
   ucReg = fnSelectChannel(Channel);
  *ucReg = UART_RESET_CMD_PTR; //reset mode register
ucReg =TmpPtr; //point to  UMR1n

Dta1=(unsigned char)*ucReg; //read UMR1n
Dta2=(unsigned char)*ucReg;//read UMR2n

Now Dta1 and DTA2 was equal to 3, which isnt correct.  This isnt what I expected , why is this?

Best Regards
Neil

20
NXPTM M522XX, KINETIS and i.MX RT / Re: Strange UART operation
« on: February 03, 2020, 08:52:16 PM »
HI Mark
  I have attached a couple of screen shots. Im setting the uart to 9600N82 . 

The first snap shot (1.png) : Line highlighted is where I am stepping.
 UMR12 & UMR12= 0x13  . Sets 8 bits no partiy on UMR12 , setting 2 regs with one write.

The second snap shot (2.png) :
UMR12 & UMR22 = 0xf ;  This is what is in ucBits variable (pointed to by arrow). So previous value is overwritten.

I dont understand why both registers get sets to the same value at the same time. The second snapshot looks like its setting 2 stop bits, but it also sets UMR12 register. Why is this?
If its writing to 2 registers at the same time, why are both the same value?

Best Regards
Neil

21
NXPTM M522XX, KINETIS and i.MX RT / Re: Strange UART operation
« on: February 03, 2020, 07:07:26 PM »
Hi Mark
  No, it is like your bit of code below and is commented out.

Best Regards
Neil

22
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





23
Hi Mark
 After having no success with this. I somehow managed to get codewarrior V7.1 installed on my Windows 10, and works fine. I downloaded my license key(only key V7.2 worked, not 7.1) from NXP and all compiles and runs no problem. Not sure what I done to manage this, but I will be doing a image of my drive .

Thanks
Neil

24
Hi Mark
  Looking at the link , I dont have folders ".settings", ".cproject" etc.  as mentioned in the first paragraph . And also I dont have a "project_settings" folder, or any "."folder.   These things are mentioned before starting codewarrior 10.0.

Neil 

25
µ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

26
utFAT / Re: latest version
« on: December 05, 2017, 04:57:24 PM »
Hi Mark
  That seemed to be the issue, thanks for that. I never thought about the value being too large for the variable.

I used the following to get freespace.

unsigned long Freespace=ptrDiskInfo->utFileInfo.ulFreeClusterCount * ptrDiskInfo->utFAT.ucSectorsPerCluster;

How do I get the size of the card?

Regards
Neil

27
utFAT / Re: latest version
« on: December 04, 2017, 04:41:30 PM »
Hi Mark,
  Thanks for the below.
I read the size and free space with the below. The card size is 8GB, and the checkcsd() function is the same.

ulong Freespace,CardSize;
ptrDiskInfo = fnGetDiskInfo(DISK_D);
Freespace=ptrDiskInfo->utFileInfo.ulFreeClusterCount * ptrDiskInfo->utFAT.ucSectorsPerCluster * ptrDiskInfo->utFAT.usBytesPerSector;
CardSize=ptrDiskInfo->ulSD_sectors * ptrDiskInfo->utFAT.usBytesPerSector;
 
Freespace=3516268544
CardSize=3531603968

CSD: 0x40 0x0e 0x00 0x32 0x5b 0x59 0x00 0x00 0x3a 0x4f 0x7f 0x80 0x0a 0x40 0x00 0x9d

I have attached the ptrDiskInfo  info.

Best Regards
Neil


28
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

29
Hi Mark
  Thanks for that, much appreciated.

Best Regards
Neil

30
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

Pages: 1 [2] 3 4 ... 30