M9S08JM60  Is anyone using these yet?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

M9S08JM60  Is anyone using these yet?

8,664 Views
TurboBob
Contributor IV
The JM series is just in time to keep me from giving up on Freescale and switching to another manufacturer with integrated USB.  My last project used the AW60, and an FTDI USB interface.  It was frustrating to pay more for the comm's chip than the CPU.  The private labelling of the USB drivers went ok, and I was able to modify the AN2295 bootloader to work.  I am hoping the USB solution provided by the JM series will work smoothly (Windows is usually the biggest problem....)

So,  has anyone got the demo kit yet?  I have been reading thru the doc's, but there is nothing better than having hardware to experiment with.

Is it possible that the JM60 can be a USB host, and save data in a USB flash drive?

I am hoping that Codewarrior 5.1 will work with these, as I don't want to have yet another installation of codewarrior on my machine (running 3.1 and 5.1)

Thanks guys, and Happy NewYear!!

Bob Bailey
Bailey Engineering
Labels (1)
0 Kudos
97 Replies

1,248 Views
Nik
Contributor III
Hi,
 
I'm trying to enter STOP2.  I think it's entering STOP3 because it's not reseting on wake.
I see several conditions that will force STOP3 when trying to enter STOP2:

ENBDM set
ERCLKEN and EREFSTEN set
LVDSE and LVDE set

Any help would be appreciated.  Thanks.

-Robert


 

0 Kudos

1,248 Views
Nik
Contributor III
To anyone else dealing with STOP2:
 
STOP2 takes the reset vector, you must ack SPMSC2_PPDACK in your startup code. 
 
My dark current is now in the nanoamps.
 
Regards,
 
-Robert
0 Kudos

1,248 Views
wesleyR
Contributor I
I require about 140KB a second which I am hoping is far within the capability of JM60 as I would love to be able to transfer even more then this.


Message Edited by wesleyR on 2008-03-08 04:48 AM
0 Kudos

1,248 Views
TurboBob
Contributor IV
Have you started to use the CF V1 chip yet?  I am not sure if I can get them yet but am very curious how much faster my stuff will be.  (not the USB, but just the processor thruput)
 
My data requirements are modest at this point.  I would like to exchange 256 bytes at about 10 hz.  sending them in multiple packets is no big deal.
 
 
Thanks for your help,
 
Bob


Message Edited by TurboBob on 2008-03-08 03:35 AM
0 Kudos

1,248 Views
JimDon
Senior Contributor III
The CF V1 won't be available until "summer".
256 bytes at 10 hz should be no problem, even with the 08 version.

Hopefully, the CF chip will be high speed.

I believe you will be able to drop the CF chip right into the JM board.
0 Kudos

1,248 Views
mustang
Contributor I
Hi Bob,
 
Freescale has JM60 Codewarrior SP for V5.1, V6.0 and V6.1.   You don't need to install a new version Codewarrior. You can download JM60 SP on freescale website. http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=S08JM&nodeId=01624684491437&fpsp=1&ta...
 
 
 
Hi ac,
 
JM60 header files are included in CW JM60 SP.  You can d/l it if you have installed CW.
 
 
 
0 Kudos

1,248 Views
ac
Contributor I
tnx pare...

i found it usefull...

but i have another question..

do i have to include a driver in my program to be able to communicate the mc9s08jm60 with my pc using USB?
(this is already in application to the MCU, not just debugging)

another thnx in adv..
0 Kudos

1,248 Views
JimDon
Senior Contributor III
Yes, I have the DEMOJM board.

It really needs no drivers.
- It comes with sample for Mouse Keyboard and generic Hid. Also a CDC sample.
Obviously, the mouse and keyboard need no drivers.
A generic Hid device needs no driver and it comes with a sample VC project.
The serial port code uses the built MS usb serial driver !!! All you need is an ini file.

I have expanded the generic demo to read the accelerometer, and pot and have re- written the hid interface code so that you don't need the DDK to build it. I also added a separate  read thread and a circular buffer so that it will not lose read data - the accelerometer pumps out quite a bit of data. I also changed the Hid device to send 8 byte reports instead of single byte  and added a frequency generator controlled buy the USB.

I will eventually set up a download for all this, and I am making a DLL for the hid interface that can be used in .NET or whatever.

This is one of the best demo boards I have ever had, and some of the best USB free drivers. And there is more to come - the CF V1 chip will support OTG. I think it will plug into this board.

Another cool thing is mine came with a 64 pin LQFP socket and a vaccum pen.


0 Kudos

1,248 Views
Nik
Contributor III
Nice work Jim!  I have been writing my USB apps for Microchip USB parts, but in C# / .net on the PC side.  This is my 1st endevor with the Freescale part.  I'd sure line to see the source for your app.  When do you think you'll be posting it?
 
Thanks again,
-
Robert
0 Kudos

1,248 Views
Nik
Contributor III
I have ported Jim's app to C#/.net.  I can post it if anyone needs it.
-
Robert
0 Kudos

1,248 Views
TurboBob
Contributor IV
I am interested in the C#/.NET version.
 
Can you post it, or email it to me?
 
My email address is bob<at>bailey-eng<dot>com
 
thanks
0 Kudos

1,248 Views
Nik
Contributor III
Demo code in C# is posted here:
 
 
Regards,
-
Robert
0 Kudos

1,248 Views
Nik
Contributor III
Hi,
I've added the capability to emulate EEPROM in flash.  I took it from a Freescale PowerPoint presentation, "Emulating EEPROM with FLASH on an S08-Based MCU"
 
I will post the code here soon:
http://nikola.com/freescale_demo.htm
 
I've made the assumption that if all of the flash bytes to be changed are 0xFFs, then there's no need to erase the page.  I wonder if a page needs erasing if all of the individual bits to be programmed are either a '1' of or already the same as the new byte's bits?  For example, if the flash byte is 01101100 and the the byte to be programmed is 01100000- would this page not need erasing?
 
It is not possible to execute from flash while doing a page erase.  The method used in the presentation does this:
The erase page function is in a separate target.  This target creates a hex file and this file is specified in the main applications linker file.  The main application then copies the function to ram, and it is executed from there.  This seems like a lot of work.  I wonder, is the code not relative and relocatable without address fixup?  If so, just one target would be required.
 
-
Robert
0 Kudos

1,248 Views
JimDon
Senior Contributor III
Something like this works just fine, only uses 6 bytes of RAM:

Code:
volatile unsigned char PGM[6]  = {  0xf7,                // sta ,X      FSTAT  0x44,               // lsra -  delay and convert to FCCF bit0xf5,               // Bit X ,fstat0x27,0xfd,          // BEQ *-10x81                // RTS}; byte FlashErasePage(word page) {      asm {      TPA         ; Get status to A      PSHA        ; Save current status        SEI         ; Disable interrupts      LDA  #0x30      STA  FSTAT  ; Clear FACCERR & FPVIOL flags      LDHX  page      STA ,X      ; Save the data      LDA  #$40   ; Erase command      STA  FCMD      LDA  #FSTAT_FCBEF_MASK      LDHX @FSTAT       JSR  PGM      PULA        ; Restore previous status      TAP   }     if (FSTAT&0x30){                     //check to see if FACCERR or FVIOL are set    return 0xFF;                       //if so, error.   }      return 0;    }byte FlashProgramByte(word address, byte data) {      asm{      TPA        PSHA        ; Save current status        SEI         ; Disable interrupts      LDA  #0x30      STA  FSTAT  ; Clear FACCERR & FPVIOL flags      LDHX  address      LDA  data      STA ,X      ; Save the data      LDA  #$20   ; Burn command      STA  FCMD      LDA  #FSTAT_FCBEF_MASK      LDHX @FSTAT       JSR   PGM      PULA        ; Restore previous status      TAP   }       if (FSTAT&0x30){                     //check to see if FACCERR or FVIOL are set    return 0xFF;                         //if so, error.   }      return 0;    }

 Or if you prefer to do it on the stack:

Code:
byte FlashErasePage(word page) {volatile unsigned char PGM[9]  = {  0x45,0x18,0x25,     // LDHX @FSTAT 0xf7,0x44,               // lsra -  delay and convert to FCCF bit0xf5,               // Bit fstat0x27,0xfd,          // BEQ *-30x81                // RTS}; asm{          TPA        PSHA        ; Save current status        SEI         ; Disable interrupts      LDA   #0x30      STA   FSTAT ; Clear FACCERR & FPVIOL flags      LDHX  page      STA ,X      ; Save the data      LDA  #$40   ; Erase command      STA  FCMD      LDA  #$80      LDHX  @PGM      JSR  ,X      PULA        ; Restore previous status      TAP   }      return (FSTAT & 0x30);    }byte FlashProgramByte(word address, byte data) {volatile unsigned char PGM[9]  = {  0x45,0x18,0x25,     // LDHX @FSTAT 0xf7,0x44,               // lsra -  delay and convert to FCCF bit0xf5,     // Bit fstat0x27,0xfd,          // BEQ *-30x81                // RTS};    asm{      TPA        PSHA        ; Save current status        SEI         ; Disable interrupts      LDA   #0x30      STA   FSTAT ; Clear FACCERR & FPVIOL flags      LDHX  address      LDA   data      STA ,X      ; Save the data      LDA  #$20   ; Burn command      STA  FCMD      LDA  #$80      LDHX  @PGM      JSR  ,X      PULA        ; Restore previous status      TAP   }      return (FSTAT & 0x30);  }





Message Edited by JimDon on 2008-06-15 02:47 PM
0 Kudos

1,248 Views
TurboBob
Contributor IV
I am slowly getting the HID stuff working based on Jims hard work (thanks Jim!)
 
However,  I want to build in a USB based Bootloader.  The one in the other app note uses the other style driver, which adds complexity from the user's standpoint.  I want to allow the end users to flash in new code over USB.
 
Has anyone ported the AN2295 to use the HID interface?
 
Thanks!
 
Bob
0 Kudos

1,248 Views
Nik
Contributor III
Very cool, thanks!
0 Kudos

1,248 Views
JimDon
Senior Contributor III
And no, you are not supposed to "over burn", but they imply it is ok to write it to all 0's to marked it as not longer valid,
0 Kudos

1,248 Views
Nik
Contributor III
Thre are some strange things on the DemoJM.  The 1.5K pull-up resistor on the USB D+.  Why is it needed?  The part has an internal one.
 
 
0 Kudos

1,248 Views
Nik
Contributor III

I am running the 9S08JM60 on 3.3V, so we can’t use the internal USB regulator.  We plan on connecting pin 25, the USB 3.3V supply to VDD.  When the part enters STOP 2 or STOP 3, will the USB be completely powered down?  I.E., will the part be in the very low power mode, < 1uA?

 

Thanks,

-

Robert

 
 
0 Kudos

1,248 Views
echarry
Contributor I
Hello guys,
 
I've been trying to follow all the discussion in reg of the S08JM60, although I am pretty new to the DEMOJM AND USB. I think I've been reading enough about USB to at least fairly understand some of the topics listed here.
 
My app involves the driving of 2 GPIOs, 2 ADCs readings and the USB transmission (ideally to a Labview 8.0 interface). The DemoLabs went smoothly. However I am trying to use the AN3582 as a reference for my aforementioned app. That AN describes a data logger, with some accelerometers readings and the USB transmission to a Freescale's GUI.  The GPIO just drive the LEDs, but in my case they'll drive two transistors. Ideally I should use the MCF51JM because it's OTG (it shall be connected to a mobile phone as a host), but I just wanted to get familiarised with the FS first.
 
The thing is the PC driver and the GUI that the AN mentions. CW6.2 compiles and programs the firmware nicely, however Windows (mine is Vista!) doesn't recognize the device (of course). Any direction? I just can't find that GUI and the DLL cited in that AN (which I assume is the driver) - page 15.
 
Something I also haven't fully understood is if using a HID class device (which Win has the sys files already) I can transform that HID demo into my application, knowing that it should use less bandwidth than I need. It would be a matter of changing the endpoint descriptor to bulk or isochronous?
 
Any information is highly appreciated! :smileyhappy:
Edgar Charry
 
 
0 Kudos