MBrej
Newbie level 4
max3421e
Hi, Im implementing the MAX3421e in host mode with a small microcontroller, and using the maxim C code for guidance. Ive managed to transfer the detect device and detect device removal routines for my microcontroller, and now need to write the enumeration routine. The first step is to send 'Get_Descriptor_Device' and get the first 8 bytes from the peripheral, while it is still on the default bus address of 0. After that the host sends the command to move the device to a unique address, and continues to query the device.
The problem I have is after sending commands to the device, the MAX3421 writes the HRSL register with the result of the transfer, and this result reads back 0x0D (hrJERR - J-state instead of response), and then 0x05 (hrSTALL) when tokens are sent (presumably the device didnt think much of the 'Get_Descriptor_Device' command). There is a similar response to trying to change the address, and then when the address has attempted to be changed, there is absolutely no response on the new address, any control transfer only gets 0x0D as the result, and never 0x05 (hrSTALL), presumably the device has not changed address.
I am fairly sure i have correctly implemented the code using the maxim example, I am confident my SPI routines work as I can control the IC fine, but I have not been able to find why the result of the transfers is always hrJERR (for the main control command transfer) and then hrSTALL for tokens (such as tokIN and tokINHS) sent to complete the transfer. If anyone would know what causes this result and what may be the problem, help would be much appreciated.
Thanks, Matt
Hi, Im implementing the MAX3421e in host mode with a small microcontroller, and using the maxim C code for guidance. Ive managed to transfer the detect device and detect device removal routines for my microcontroller, and now need to write the enumeration routine. The first step is to send 'Get_Descriptor_Device' and get the first 8 bytes from the peripheral, while it is still on the default bus address of 0. After that the host sends the command to move the device to a unique address, and continues to query the device.
The problem I have is after sending commands to the device, the MAX3421 writes the HRSL register with the result of the transfer, and this result reads back 0x0D (hrJERR - J-state instead of response), and then 0x05 (hrSTALL) when tokens are sent (presumably the device didnt think much of the 'Get_Descriptor_Device' command). There is a similar response to trying to change the address, and then when the address has attempted to be changed, there is absolutely no response on the new address, any control transfer only gets 0x0D as the result, and never 0x05 (hrSTALL), presumably the device has not changed address.
I am fairly sure i have correctly implemented the code using the maxim example, I am confident my SPI routines work as I can control the IC fine, but I have not been able to find why the result of the transfers is always hrJERR (for the main control command transfer) and then hrSTALL for tokens (such as tokIN and tokINHS) sent to complete the transfer. If anyone would know what causes this result and what may be the problem, help would be much appreciated.
Thanks, Matt