M9S08JM60  Is anyone using these yet?

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

M9S08JM60  Is anyone using these yet?

12,327 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
Reply
97 Replies

1,630 Views
JimDon
Senior Contributor III
Well as long as we are guessing, I think you should change the PID on the board and in Roberts code any see if possibly some how it got put in the registry wrong from before.

It's just a swag, as I have never heard of this problem before.
0 Kudos
Reply

1,630 Views
Inebriated
Contributor I
Hi Jim,
 
I am curious. How come your HID-LED modified demo firmware shows geh_product string, "USB HID LED demo for HC09S08JM devices" in the Windows task ballon during enumeration instead of the geh_interface string "HID-LEDs" as with the unmodified firmware from Freescale? Also, for your firmware, this geh_product string appears in the location field in windows Device Manager whereas the original firmware doesn't. Just wondering what i am missing here with usb strings. :smileyhappy:
 
Cheers,
John
 
 
 
 
0 Kudos
Reply

1,630 Views
Inebriated
Contributor I
Hi Jim,
 
I changed the PID on the board and Robert's code and the same error persists. I also tried changing the VID and the error still persisted as well.
 
John
0 Kudos
Reply

1,630 Views
Nik
Contributor III
I see an error in the code.  In OpenUSB(), EnumerateHidDevices() fails, I display a message that GetHIDError() fails. This isn't the problem, just the wrong message.  You might try stepping through OpenUSB().  I see that I have EnumerateHidDevices in a try-catch block that might be hidding some error info. EnumerateHidDevices() is in HIDDriver.dll.  I think it is EnumerateHidDevices() that is failing.
 
Of course this DLL needs to be in the executable path.
-
Robert
0 Kudos
Reply

1,630 Views
Inebriated
Contributor I
Hi Robert,
 
I stepped through the code and EnumerateHidDevices() returns a 1 which is causing the GetHIDError(). In the try-catch block, the code does not enter the catch block. I have the HIDDriver.dll located in hidgenericAPPNet2005\hidgenericAPPNet\bin\Debug which i assume is the executable path.
 
I guess the question really is why does EnumerateHidDevices() return a 1?
 
Thanks.
 
John
0 Kudos
Reply

1,630 Views
Nik
Contributor III
John,
Please check your messages.
0 Kudos
Reply

1,630 Views
Inebriated
Contributor I
Hi Robert,
 
Sorry for the delayed response. The PCs that I have tested the appilcations on are running Microsoft Windows XP Professional Version 2002, Service Pack 2. Essentially, the PCs are all running the same OS but for some strange reason fails on 3 of them.
 
All the PCs except 1 have visual stuido 2005 loaded on them. That exception has Visual Studio C++ 6.0 on it and the HID-LED-DEMO application runs on it successfully.
 
John
 
 
0 Kudos
Reply

1,630 Views
JimDon
Senior Contributor III
Do you have service pack 1 for VS2005 installed?
0 Kudos
Reply

1,630 Views
Inebriated
Contributor I
Hi Jim,
 
Yes, I have SP1 for VS2005. 
 
Do you think its a Window's bug because what i can see is that the code is simply calling a Windows API but the API is returning an errorneous result.
 
John 
0 Kudos
Reply

1,630 Views
JimDon
Senior Contributor III
Not sure if it is a Windows bug. More likely a hardware issue.
This code has run on many machines, so it is something about these PC's (at least that's what I think).
One thing you might try is self powering the board. I have heard of cases where the power from the USB bus was off a bit. Look over the jumpers and see if you have a wall wart around that could power the board.
Also if you are using a hub, try directly connecting.
All they all the same kind of PC? if so what kind and how old.
0 Kudos
Reply

1,630 Views
Inebriated
Contributor I
Hi Jim,
 
2 of the 3 failed machines are HP Laptops, HP NX6320 about 1.5yrs old. The 3rd is a desktop but I havent got that configuration on hand. Currently the demo board has been directly connected to the PC ports and not through any hubs.
 
I havent got the board with me right now but will try self-powering the board tomorrow and let you know how that works out.
 
In case i havent mentioned it, for the original hid-led-demo project from CMXLite, both the Mouse and Keyboard demo ran correctly but not the LED one. So like you mentioned, the fault is probably the PC machines. But what? Sigh....
 
Btw, thank you for taking the time to look into this. Really appreciate it. :smileyhappy:
 
John
0 Kudos
Reply

1,630 Views
JimDon
Senior Contributor III
And/Or try a powered hub.
0 Kudos
Reply

1,630 Views
Inebriated
Contributor I
Hi Jim,
 
Good news! I figured how to make it work. On my laptop, in Device Manager there is a USB compliant device - HP Quick Launch Buttons that is enumerated. When i uninstall that, the demo board works!
 
But would you know why or how that made the API calls fail?
 
John
0 Kudos
Reply

1,630 Views
gerk
Contributor I
I've been following this thread because I have the same hid-led-demo problem where it will run on 1 pc but not my development pc.  I've been trying some of the same trial-and-error approaches listed here and was glad to see inebriated had success by uninstalling the hp quick launch driver.  My machine is also an hp laptop and so I uninstalled the quick launch driver but it still failed.  So I used the wireless manager to disable all wireless connections (both bluetooth and wi-fi, didn't un-install, just disabled) and the demo started up good.  Then I re-enabled the wireless connection and the demo continued to run fine until I closed it.  On trying to open it up, it failed again. (presumeably due to a conflict caused by the wireless device(s) - also pointing to a failed HIDOpen() call at startup. 
 
Perhaps there are other drivers that conflict with this demo code.  Inebriated, are all of your machines that wouldn't run the demo from HP?
 
Eric.
0 Kudos
Reply

1,630 Views
Inebriated
Contributor I
Hi Eric,
 
I had 3 computers which wouldnt run the demo application, 2 of them were HP laptops and the 3rd was a Dell desktop.
 
John
0 Kudos
Reply

1,630 Views
JimDon
Senior Contributor III
Good work guys.
I get get access to an HP laptop, I will see what happens.

The HIDOpen fails if it thinks it can't find the device.
One possibility is that the HP code has a bug that when it enumerates devices it fails to release them.
Also, there are updates from HP see if these fix anything.

0 Kudos
Reply

1,630 Views
Inebriated
Contributor I
Hi guys,
 
Has anyone of you tried enumerating the M9S08JM60 as a usb composite device? I am modifying the hid-demo code to make it a usb composite device but to no avail so far. Any advise? :smileyhappy:
 
Thanks.
 
Regards,
John
0 Kudos
Reply

1,630 Views
Inebriated
Contributor I
Hi guys,
 
Just to make it a bit clearer, I am intending to enumerate the JM demo board as both a keyboard and generic HID device at the same time (i.e. composite device). However so far all enumeration attempts have failed. :smileysad:
 
Thanks,
John 
0 Kudos
Reply

1,630 Views
Nik
Contributor III
Glad there's some progress on this issue.  Thanks all.
 
I have an odd probelm:  Keyboard interrupts.
 
If I enable edge only, I never see one.  If I use edge & level, all is fine.  I see from the logic diagram that level interrupts skip the flip-flop.  It's acting as if the FF reset is stuck.
 
Either edge or level interrupts work for this application, but I'm just bugged by this.
 
Code:
 
extern SWITCHES Switches;
void KBIInterruptInit(void)   // switches 1-4
{
  KBISC_KBMOD = 0;   // edges.  Change to =1 and it works
  KBIES = 0;                   // falling edge
  KBIPE = 0xc3;             // We are using KBIP 0, 1, 6, & 7
  KBISC_KBACK = 1;  
  KBISC_KBIE = 1;
  key_interrupt_timer = 0;
}
 
void interrupt KBI_interrupt(void)
{
  KBISC_KBIE = 0;        // disable interrupts, will be re-enabled by the timer.
  KBISC_KBACK = 1;
 
  if(!SW1)
    Switches.Bits.SW_1 = 1; 
  if(!SW2)
    Switches.Bits.SW_2 = 1;
  if(!SW3)
    Switches.Bits.SW_3 = 1;
  if(!SW4)
    Switches.Bits.SW_4 = 1;
 
  key_interrupt_timer = 100;  // 100 ms before we recognize another keypress
}
0 Kudos
Reply

1,630 Views
Nik
Contributor III
Please ignore, I had a floating input.
-
Robert
0 Kudos
Reply

1,630 Views
Inebriated
Contributor I
Hi Jim,
 
I tried your suggestions and used a powered hub as well as self powered the board but to no avail.
 
 
John
0 Kudos
Reply