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,409 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,318 Views
Nik
Contributor III
Just today I tried the DEMOJM with the HID drivers on Vista.  Seems to work.
 
Regards,
-
Robert
0 Kudos

1,318 Views
echarry
Contributor I
Hi Robert,
 
Yes they work for just for that Demo HID class and Vista loads the mouclass.sys and mouHID.sys drivers. The thing is again: the AN3582's firmware is ready for me. :smileyhappy: I don't think the HID demo will satisfy the bandwidth requirements of my application (which are very similar to that one from the AN - driving the GPIO's, ADC readings and USB tx).
 
Just need to find the correspondant drivers for Windows, so that my device can be recognized....Or just work on that HID demo.. :smileysad:
Regards,
Edgar Charry
0 Kudos

1,318 Views
JimDon
Senior Contributor III
- The HID Class does not do bulk or isochronous.
- You can get 64K Bytes per-second which roughly maps to 640K Baud on a serial port.

What are you bandwidth requirements?


0 Kudos

1,318 Views
echarry
Contributor I
Hi Jim,
 
Sorry for the late reply.
Certainly 64k/s is more than enough for my application. As said before I am really new to USB and the DEMOJM.
 
In fact, I managed to install the INF file and associate it with Labview VISA-API.
It does the controlling and reading and of the controlling pipes from the device and get all the descriptors as assigned in the firmware. I still need to check though, how I can control the ADC readings /GPIOs straight off from my Labview application, according to the ISR.
 
However some concepts are still not clear:
1) By chaging the type of the endpoint descriptors to say bulk instead of interrupt transfer I would still need check the token flag from the intstat register and trigger my ISR (check the stat registers and so forth..). By selecting the interrupt transfer I would need an application that needs to transfer packets periodically and waits for the host to poll the bus, so that data can be transfered right? If it were a bulk transfer it would ALSO send an IN token, when the host polls it correct? In other words, what could be the advantages or disadvantages of use one or the other?
2) The classes are solely a way to classify groups of similar in terms of bandwidth,  transmission requirements etc, so that drivers for the OS managing the host could be developed easilier. Correct?
3) Is it possible to supply power to a "dumb" device by the the 5V from the bus, without any USB control on it? The 500mA from the USB port are the absolute maximum, or just for USB purposes? Seems very dangerous to do that.. but doesn't hurt asking..
 
Sorry for the big msg guys... but again, any information is always welcomed.
Edgar Charry
In other words 
0 Kudos

1,318 Views
JimDon
Senior Contributor III
HID is a class with a pre-installed class driver. It can not do bulk. It does not require any .inf file. All you can do is jack up the report to to 64 bytes.

I will post a link to the HID dll I wrote. Labview will have no issues using the dll, it has already been done.

If you use some "other" class, other than HID or CDC, you will have to provide a driver.

If you use CDC, you will have to use an inf file that tells windows that device uses the built in usb serial driver.
0 Kudos

1,318 Views
gerk
Contributor I
I am having the identical problem detailed by dp regarding the hid-led-demo.exe file and the "HID initialization failed" message.  I've tried the code posted in this thread that was supposed to revert the board back to original code and it is no better.  I can see from Windows XP device manager that enumeration is completing ok and the device shows up with the appropriate VID and PID.  Does anyone know how to solve this?  I planned to model my application on the generic-hid example from this demo kit.  The other examples from the kit work fine.  Any help is greatly appreciated.  Thanks.
0 Kudos

1,318 Views
JimDon
Senior Contributor III
Did you press the button to make it go into Generic HID mode?
0 Kudos

1,318 Views
echarry
Contributor I

Hi Jim,

I've been reading and reading lately and now I realise that I don't need the HID driver, as the implemented firmware doesn't have a specific class. Labview implements the USB low-level drivers with VISA API. The system recognizes it fine (dodgy sometimes) and I can read the dev and conf descriptors (please see attached figures). This is why I'm bent to say it's not a Vista/LV8 problem. And besides using that DLL entails changing the firmware, which I can't afford the time now.

According to the text, there are 5 pipes -> 0: control; 1: bulk/Out (command); 82: bulk/In (Status); 83: bulk/Out (Data Out); 85: interrupt/In (Data In).  As you can see in the attached figures, I can communicate with the control pipe using MAX (sort of a 'device explorer" from NI) nicely.

The problem is that I cannot set the commands to access the modules ADC (0x02), GPIO (0x06), TPM (0x07) etc which are described in the AppNotes and in the code. And I've spent considerable time already in this trial and error scheme.  The ISR should jump to the specific routine in a switch - case, according to these modules. 

Although you don't know how the firmware is, as far as I understood, I assume that whenever I set a command (e.g. 06 00 0F using VISA write) -the four MSB LED's should turn on/off for example). Besides, if I want the actual ADC configuration it would be (02 02) and I should then wait for an interrupt event  in my intr-in pipe and then read the data out, correct? Again, I can read the control pipe, so I assume that I am not that far away. Or this can be false?

This is driving me nuts already...

Thanks so much for any clue,

Edgar Charry

0 Kudos

1,318 Views
gerk
Contributor I
Jim D.,
 
Thanks for the response - Yes, I pressed PTG1, then reset, then released reset, then PTG1.  Device Manager recognizes the new device ("HID LED demo..." as opposed to "HID Mouse.." or "HID Keyboard...") so I assume that device enumeration is ok.   When I step through the pc gui code, the HIDOpen() call returns "device not found" after comparing VIDs and PIDs of all attached USB devices.  Any idea why this would fail when I can see from device manager that the VID and PID matches what the code is looking for?
 
Eric.
0 Kudos

1,318 Views
JimDon
Senior Contributor III
First of all, if are seeing a bulk end point, then I don't think it is HID. This is per the spec for HID - it does not support bulk end points.

I've never seen a device that uses the control end point for any functionality. It would be a real hack, as normally the control end point just get device descriptors and such.

What is the app note for this? I have not used this package.

It sounds like you did not get source code. That is not a good thing, and you might ask support for the source code.


0 Kudos

1,318 Views
echarry
Contributor I
Hi Jim,
 
Yes indeed it's not a HID. But with that app (which is also using interrupts through a pipe in), I can get the bandwidth I need. No problems.
 
I didn't say though that the AN3582 (plz see attached) is using the control pipe for any functionality.
Plz refer to page 6: I just said that he uses the pipe 1 as bulk type to send commands to the device. Commands as found in the Appendix A (read ADC, drive GPIO's etc...). It's a customized protocol/firmware using the DemoJM for the JM60. Not commands like "Get status from EP or interface".
 
Yes I got support from Freescale and they sent me the source code from that AppNotes. And everything seems as explained there. However again, the problem is that I can get the descriptors, (thru pipe0)  but my device doesn't respond to those commands cited above.
 
Edgar Charry
 
Message Edited by t.dowe on 2009-09-16 10:02 AM
0 Kudos

1,318 Views
echarry
Contributor I
Hi Jim,
 
Yes indeed it's not a HID. But with interrupts, I can get the bandwidth I need. No problems.
 
I didn't say though that the AN3582 (plz see attached) is using the control pipe for any functionality.
Plz refer to page 6: I just said that he uses the pipe 1 as bulk type to send commands to the device. Commands as found in the Appendix A (read ADC, drive GPIO's etc...). It's a customized protocol/firmware using the DemoJM for the JM60. Not commands like "Get status from EP or interface".
 
Yes I got support from Freescale and they sent me the source code from that AppNotes. And everything seems as explained there. However again, the problem is that I can get the descriptors, (thru pipe0)  but my device doesn't respond to those commands cited above.
 
Edgar Charry
0 Kudos

1,318 Views
Nik
Contributor III
Could anyone point me to i2c sample code for this part? 
 
Thanks,
 
-
Robert
0 Kudos

1,318 Views
Nik
Contributor III
Disregrd, I have this working.
-
Robert
0 Kudos

1,318 Views
Nik
Contributor III
Is there a profiler available for Codewarrior and this processor?  The help file says:
 
  • In demo/unregistered debugger mode, code program reconstruction has a limited number of frames displayed in the Trace window.
    • Real time code Profiling and code Coverage are disabled.

      So, does the licensed version have profiling for the 9S08?

      Thanks,

      -
      Robert

      0 Kudos

      1,318 Views
      JimDon
      Senior Contributor III
      Robert,

      Just wondering what do they need from the orginal Freescale demo code?

      Jim

      Also, please report any bugs or problems you may have with this.



      0 Kudos

      1,318 Views
      Nik
      Contributor III
      Sorry for the confusion, the web all that is needed is on the web page:
       
      Regards, Robert
      0 Kudos

      1,318 Views
      krashcraft
      Contributor I
      All,
      I have been trying to follow this thread. because of the problems with the DEMOJM.  I have the DEMOJM and am trying to expand on the HID demo code for my projects, but....., I am not sure I have a successful compile. I get no errors, (now), but I also DON'T get any indication that it compiled.

      Also, one of Freescales compeditors (Microchip) gives you the original HEX code, so that if everything gets so bad of trying to compile the original demo, you can reprogram the microcontroller with the original HEX to make sure the DEMO board is working as you received it from the factory, and start over.

      I can't find any original HEX files to reload into the DEMOJM board to make sure everthing is working OK. I "think" I have found the original "source" code, but there again, I don't know if I am compiling.

      With Microchip, I would take "My Compiled HEX file" and compare it to the "Original Factory HEX file" and see if everything is OK, then I would program with MY HEX file. That way I knew everything was ready to go.

      I would like to compile the Original file, then download that into the micro, and make sure that everything is working as normal, THEN...... start changing code to see how things are working.

      Any suggestions?

      Thanks,
      Keith
      0 Kudos

      1,318 Views
      Nik
      Contributor III
      Hello Keith,
       
      We have been using Microchip in many product for many years.  I have recently started development of a product using Freescale.  I don't see any problems with DEMOJM.
       
      You are not seeing anything when you "make" the project because all of the files are up to date.  If you want to see a message regardless: 
      Edit -> Preferences -> Build Settings, check "Show message after building up-to-date project".
       
      -
      Robert
      0 Kudos

      1,318 Views
      krashcraft
      Contributor I
      Thanks Jim and Robert. I will give it a try tonight at home, and see what I come up with!!!
      Keith

      0 Kudos

      1,318 Views
      krashcraft
      Contributor I
      OK, Not having much luck.
      I get 14 errors:
      Each one is this:
      C4437: Error-directive found: No USB configuration selected!
      usb-drv/usb_config.h line 42

      I have made a duplicate to the following:
      c:\CMXUSB_LITE_KRA\usb-peripheral\projects\CodeWarrior\hc9S08jm60\hid-demo
      and load hid_demo.mcp

      Also, under the project TAB, I am not sure which "debugger" to use. (I think that is the debugger)
      Full Chip Simulation
      P&E Multilink.......
      SofTec HCS08
      HCS08 Open Source......

      Sorry for being a pain guys. Thanks for your support.

      Keith
      0 Kudos