Re: why ATAT RX clock invalid when run MIDI on xu224 board
Posted: Fri Sep 15, 2017 4:38 am
Hi infiniteimprobability
In this project, i have an other issue, DFU can't download image. would you please give some advices, thanks
we found DFU_mode_active can't be set, and maybe device_reboot( ) have some problem.
the following souce just can loop 1 time, the second time just can read_sswitch_reg( ), but can't write_sswitch_reg( ) then exit loop
void device_reboot_aux(void)
{
#if (XUD_SERIES_SUPPORT == XUD_U_SERIES)
/* Disconnect from bus */
unsigned data[] = {4};
write_periph_32(usb_tile, XS1_SU_PERIPH_USB_ID, XS1_SU_PER_UIFM_FUNC_CONTROL_NUM, 1, data);
/* Ideally we would reset SU1 here but then we loose power to the xcore and therefore the DFU flag */
/* Disable USB and issue reset to xcore only - not analogue chip */
write_node_config_reg(usb_tile, XS1_SU_CFG_RST_MISC_NUM,0b10);
#else
unsigned int pllVal;
unsigned int localTileId = get_local_tile_id();
unsigned int tileId;
unsigned int tileArrayLength;
/* Find size of tile array - note in future tools versions this will be available from platform.h */
asm volatile ("ldc %0, tile.globound":"=r"(tileArrayLength));
/* Reset all remote tiles */
for(int i = 0; i< tileArrayLength; i++)
{
/* Cannot cast tileref to unsigned! */
tileId = get_tile_id(tile);
/* Do not reboot local tile yet! */
if(localTileId != tileId)
{
read_sswitch_reg(tileId, 6, pllVal);
pllVal &= PLL_MASK;
write_sswitch_reg_no_ack(tileId, 6, pllVal);
}
}/* Finally reboot this tile! */
read_sswitch_reg(localTileId, 6, pllVal);
pllVal &= PLL_MASK;
write_sswitch_reg_no_ack(localTileId, 6, pllVal);
#endif
}
In this project, i have an other issue, DFU can't download image. would you please give some advices, thanks
we found DFU_mode_active can't be set, and maybe device_reboot( ) have some problem.
the following souce just can loop 1 time, the second time just can read_sswitch_reg( ), but can't write_sswitch_reg( ) then exit loop
void device_reboot_aux(void)
{
#if (XUD_SERIES_SUPPORT == XUD_U_SERIES)
/* Disconnect from bus */
unsigned data[] = {4};
write_periph_32(usb_tile, XS1_SU_PERIPH_USB_ID, XS1_SU_PER_UIFM_FUNC_CONTROL_NUM, 1, data);
/* Ideally we would reset SU1 here but then we loose power to the xcore and therefore the DFU flag */
/* Disable USB and issue reset to xcore only - not analogue chip */
write_node_config_reg(usb_tile, XS1_SU_CFG_RST_MISC_NUM,0b10);
#else
unsigned int pllVal;
unsigned int localTileId = get_local_tile_id();
unsigned int tileId;
unsigned int tileArrayLength;
/* Find size of tile array - note in future tools versions this will be available from platform.h */
asm volatile ("ldc %0, tile.globound":"=r"(tileArrayLength));
/* Reset all remote tiles */
for(int i = 0; i< tileArrayLength; i++)
{
/* Cannot cast tileref to unsigned! */
tileId = get_tile_id(tile);
/* Do not reboot local tile yet! */
if(localTileId != tileId)
{
read_sswitch_reg(tileId, 6, pllVal);
pllVal &= PLL_MASK;
write_sswitch_reg_no_ack(tileId, 6, pllVal);
}
}/* Finally reboot this tile! */
read_sswitch_reg(localTileId, 6, pllVal);
pllVal &= PLL_MASK;
write_sswitch_reg_no_ack(localTileId, 6, pllVal);
#endif
}