Hello everybody,
I am using the microcontroler LPC1769 and I communicate with a smartphone thanks to the protocole bulk and the function send_data(). This function comes from "Example_Keyboarddevice", available on the NXP website. I would like to send pieces of data every 10 microseconds. I only manage to send it every 1ms with the bulk protocole. I tried to change some parameters but i still cant transmit data as fast as I want.
Do you know if it's possible the change the data transfer, and how I could procede?
Best regards,
Pac.
sorry for the late answer, you should find the header file bsp.h in the directory BSP
Hi vivien pac,
How is going on about this issue? whether you had already fixed it.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
yes, this is the link of google drive
https://drive.google.com/open?id=1WzEdrtO2ZqYnN5eNWFfdQWNxMffT6Mol
Hi vivien pac,
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
In fact the master is the microcontroler LPC1769, and the slave is the smartphone .This is the link to retrieve the compile-able demo :
https://www.dropbox.com/s/rjldi5vbcvq5oaw/code%20npx.zip?dl=0
Hi,
Whether you share a download link of Google drive, as I can't open it.
Have a great day.
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Yes, that’s it. I want to send data to Endpoint whose type is Bulk at fixed period (10μs)
I can send this data every 1ms, but I’m not able to reduce this period.
I changed the clock to go to the RIT_timer every 10µs, and that works fine. I’m able to switch on/off a port every 10 µs:
void RIT_SetTimerInterval(uint32_t time_interval)
{
uint32_t cmp_value;
/* Determine aapproximate compare value based on clock rate and passed interval */
cmp_value = (500) * time_interval; //(50000)=1ms
}
And in the RIT_timer, that’s what I do:
void RIT_IRQHandler(void)
{
interrupt_rit++;
uint8_t buff1[2];
/* Clearn interrupt */
RIT_ClearInt();
echantillon=echantillon+1;
if (echantillon>4095){
echantillon=0;
}
uint32_t interupt_enabled0 = *(uint32_t*) LPC_ISER0;
uint32_t interupt_enabled1 = *(uint32_t*) LPC_ISER1;
*(uint32_t*) LPC_ICER0 = ~(1<<24);
*(uint32_t*) LPC_ICER1 = 0;
*(uint32_t*) LPC_U2FCR &= 0xFFFFFFF7;
*(uint32_t*) LPC_U2TER = UART_TER1_TXEN;
UART_IntDisable( UART_IER_THREINT);
DataStream[0]=(echantillon & 0x0F00)>>8;
DataStream[1]=(echantillon & 0x00FF);
*(uint8_t*) LPC_FIO0SET2+=0x40; //Allumage LED
send_data();
//Compteur=0;
*(uint8_t*) LPC_FIO0CLR2 += 0x40; //Clear LED
*(uint32_t*) LPC_ISER0=interupt_enabled0;
*(uint32_t*) LPC_ISER1=interupt_enabled1;
}
Even when i try to decrease the send intervalle (i.e. i go to the RIT_Timer faster), the data is sent every 1ms and this time seems to be incompressible.
Hi vivien pac,
Thanks for your reply.
In my opinion, the USB bus transfer and receive operation is in the charge of USB host.
As the USB slave, it shouldn't take the initiative in transfer or receive USB frame.
So I was wondering if you can share a compile-able demo, as I'd like to run it with MCB1700 board.
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi vivien pac,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------