Commit Graph

28577 Commits

Author SHA1 Message Date
Gregory Nutt
24816cb08b All STM32 host drivers. In IN endpoint retry, delay for a clock tick to give some breathing space for the CPU. EXPERIMENTAL change. 2017-03-10 10:25:43 -06:00
David Sidrane
5ec25a87c9 Merged in david_s5/nuttx/upstream_i2c_fc2 (pull request #258)
STM32, STM32 F7, and STM32 L4: Clone Freddie Chopin's I2C change to similar STM32 I2C drivers.

Approved-by: Gregory Nutt
2017-03-10 16:02:11 +00:00
David Sidrane
2baffab16e WS 2017-03-10 15:42:59 +00:00
Gregory Nutt
360539afac Priority inheritance: When CONFIG_SEM_PREALLOCHOLDERS==0, there is only a single, hard-allocated holder structure. This is problem because in sem_wait() the holder is released, but needs to remain in the holder container until sem_restorebaseprio() is called. The call to sem_restorebaseprio() must be one of the last things the sem_wait() does because it can cause the task to be suspended. If in sem_wait(), a new task gets the semaphore count then it will fail to allocate the holder and will not participate in priority inheritance. This fix is to add two hard-allocated holders in the sem_t structure: One of the old holder and one for the new holder. 2017-03-10 09:30:15 -06:00
Gregory Nutt
769427ed5a pthreads: Fix pthread_mutexattr_init(). It was not initializing the protocol field when priority inheritance is enabled. 2017-03-10 09:24:41 -06:00
David Sidrane
acaebb361b STM32, STM32 F7, and STM32 L4: Clone Freddie Chopin's I2C change to similar STM32 I2C drivers.
Save elapsed time before handling I2C in stm32_i2c_sem_waitstop()
   This patch follows the same logic as in previous fix to
   stm32_i2c_sem_waitdone().
   It is possible that a context switch occurs after I2C registers are read
   but before elapsed time is saved in stm32_i2c_sem_waitstop(). It is then
   possible that the registers were read only once with "elapsed time"
   equal 0. When scheduler resumes this thread it is quite possible that
   now "elapsed time" will be well above timeout threshold. In that case
   the function returns and reports a timeout, even though the registers
   were not read "recently".
   Fix this by inverting the order of operations in the loop - save elapsed
   time before reading registers. This way a context switch anywhere in the
   loop will not cause an erroneous "timeout" error.
2017-03-10 05:07:39 -10:00
Gregory Nutt
a93e46d00c Cosmetic 2017-03-10 08:54:50 -06:00
Freddie Chopin
3cd66af889 ave elapsed time before handling I2C in stm32_i2c_sem_waitstop()
This patch follows the same logic as in previous fix to
stm32_i2c_sem_waitdone().

It is possible that a context switch occurs after I2C registers are read
but before elapsed time is saved in stm32_i2c_sem_waitstop(). It is then
possible that the registers were read only once with "elapsed time"
equal 0. When scheduler resumes this thread it is quite possible that
now "elapsed time" will be well above timeout threshold. In that case
the function returns and reports a timeout, even though the registers
were not read "recently".

Fix this by inverting the order of operations in the loop - save elapsed
time before reading registers. This way a context switch anywhere in the
loop will not cause an erroneous "timeout" error.
2017-03-10 07:35:10 -06:00
Gregory Nutt
d391f9d7d3 Update a README 2017-03-09 17:11:54 -06:00
Gregory Nutt
c428661e18 apps/examples/usbterm is gone because it can be configured to perform an illegal call into the OS. Remove all traces of CONFIG_EXAMPLES_USBTERM* and all of the illegal device support. 2017-03-09 15:39:28 -06:00
Gregory Nutt
9cd3f7f80a STM32, STM32 F7, STM32 L4: OTG host drivers: Do not do data toggle if interrupt transfer is NAKed. Sugested by webbbn@gmail.com 2017-03-09 15:07:31 -06:00
Gregory Nutt
110ae16af2 Remove all references to arch_usbhost_initialize(). That was incorrectly called from apps/examples/hidkbd. That is violation of the OS interfacing rules and will no longer be supported. USB host should be initialized as part of the board bring-up logic was with any other devices and should not involve illegal calls from applications into the OS. 2017-03-09 14:46:31 -06:00
Simon Piriou
6768831851 Merged in spiriou/nuttx (pull request #257)
STM32F2: add USB OTG HS support for stm32f20xxx cores

Approved-by: Gregory Nutt
2017-03-09 20:06:12 +00:00
Gregory Nutt
04297d1b0f Update some comments 2017-03-09 13:57:37 -06:00
Gregory Nutt
a3b4475474 STM32, STM32 F7, and STM32 L4: Back out part of 3331e9c49a. Returning immediately int he case of a NAK makes the Mass Storage Class driver unreliable. The retry/timeout logic is necessary. This implementation tries to implement a compromise: If a NAK is received after some data is received, then the partial data received is returned as with 3331e9c49a. If if a NAK is received with no data, then no longer returns the NAK error immediately but retries until data is received or a timeout occurs. Initial testing indicates that this fixes the issues the MSC. However, I hae concerns that if multiple sectors are read in one transfer, there could be NAKs between sectors as well and, in that case, then change will still cause failures. 2017-03-09 13:49:25 -06:00
Simon Piriou
31aef4a9c0 STM32F2: add USB OTG HS support for stm32f20xxx cores 2017-03-09 20:30:32 +01:00
Gregory Nutt
d49ea44df2 Olimex STM32 P407: USB host support for USB FLASH sticks is now supported in the base nsh configuration. 2017-03-09 13:00:00 -06:00
Gregory Nutt
a786e07033 Olimex-STM32-P407: Update USB host support. 2017-03-09 12:42:04 -06:00
Gregory Nutt
49974e21ef Fix some old pashello configurations broken in last refresh 2017-03-09 10:55:41 -06:00
Gregory Nutt
7463768775 Refresh all eZ80 and z8 configurations 2017-03-09 10:52:03 -06:00
Gregory Nutt
197ba3b527 EZ80F910200KITG: Missing support logic in configs/Kconfig 2017-03-09 10:50:46 -06:00
Gregory Nutt
b6fd8bc0f5 Refresh all ZNeo configurations 2017-03-09 10:42:29 -06:00
Gregory Nutt
b379764eb3 Refresh all x86 and Xtensa configurations 2017-03-09 10:38:36 -06:00
Gregory Nutt
8b1491948c Refresh all sim configurations 2017-03-09 10:36:54 -06:00
Gregory Nutt
d001722563 Refresh all RISC-V configurations 2017-03-09 10:34:10 -06:00
Gregory Nutt
0c878668b8 Refresh all Renesas configurations 2017-03-09 10:32:49 -06:00
Gregory Nutt
245e2fe42a Refresh all Misoc configurations 2017-03-09 10:31:47 -06:00
Gregory Nutt
8a960344b1 Refresh all HC configurations 2017-03-09 10:30:48 -06:00
Gregory Nutt
d7c0e49cb1 Refresh all AVR configurations 2017-03-09 10:29:32 -06:00
Gregory Nutt
9c68d59419 Refresh all MIPS configurations 2017-03-09 10:26:56 -06:00
Gregory Nutt
d0813aa0c5 Refresh all ARM configurations 2017-03-09 10:23:41 -06:00
David Sidrane
c8efeecfda Merged in david_s5/nuttx/upstream_kinetis (pull request #256)
Kinetis:Allow Board to add Pullups on SDHC lines

Approved-by: Gregory Nutt
2017-03-09 15:34:12 +00:00
David Sidrane
2700fd9e81 Kinetis:Allow Board to add Pullups on SDHC lines 2017-03-09 05:30:02 -10:00
Gregory Nutt
ee5ae3a57d STM32, STM32 F7, and STM32 L4: Clone Freddie Chopin's I2C change to similar STM32 I2C drivers. 2017-03-09 07:37:52 -06:00
Freddie Chopin
5a6d95dd9f ave elapsed time before handling I2C in stm32_i2c_sem_waitdone()
It is possible that a context switch occurs after stm32_i2c_isr() call
but before elapsed time is saved in stm32_i2c_sem_waitdone(). It is then
possible that the handling code was executed only once with "elapsed
time" equal 0. When scheduler resumes this thread it is quite possible
that now "elapsed time" will be well above timeout threshold. In that
case the function returns and reports a timeout, even though the
handling code was not executed "recently".

Fix this by inverting the order of operations in the loop - save elapsed
time before handling I2C. This way a context switch anywhere in the loop
will not cause an erroneous "timeout" error.
2017-03-09 07:29:12 -06:00
Gregory Nutt
92858d1096 Cosmetic changes from review of a previous PR 2017-03-09 07:00:44 -06:00
Andreas Bihlmaier
c0769c9988 Merged in andreasBihlmaier/nuttx/fix-as5048b (pull request #255)
fix as5048b by adding missing frequency parameter

Approved-by: Gregory Nutt
2017-03-09 12:57:47 +00:00
Andreas Bihlmaier
5fb61d5f73 Merged in andreasBihlmaier/nuttx/feature-more_pwm_channels (pull request #254)
increase number of supported PWM channels from 4 to 6

Approved-by: Gregory Nutt
2017-03-09 12:56:40 +00:00
Andreas Bihlmaier
d5cb3f5a32 Merged in andreasBihlmaier/nuttx/fixes-lpc43_ssp (pull request #253)
actually write modified value to register

Approved-by: Gregory Nutt
2017-03-09 12:54:47 +00:00
Andreas Bihlmaier
ce908cec9c Merged in andreasBihlmaier/nuttx/fixes-lpc43_i2c (pull request #252)
use correct macro for irqid (fortunately both point to LPC43_IRQ_EXTINT+18)

Approved-by: Gregory Nutt
2017-03-09 12:53:56 +00:00
Andreas Bihlmaier
55bd808dcc Merged in andreasBihlmaier/nuttx/fixes-lpc43_ethernet (pull request #251)
fix logic in preprocessor checks and correct arguments to lpc43_pin_config initialization

Approved-by: Gregory Nutt
2017-03-09 12:53:22 +00:00
Andreas Bihlmaier
1c5ededc48 Merged in andreasBihlmaier/nuttx/fixes-lpc43_adc (pull request #250)
fix logic error in lpc43_adc

Approved-by: Gregory Nutt
2017-03-09 12:52:33 +00:00
Andreas Bihlmaier
871756b6c0 Merged in andreasBihlmaier/nuttx/fixes-lpc43_sct_and_sgpio_headers (pull request #249)
Fix errors in LPC43 SCT and SGPIO headers.

Approved-by: Gregory Nutt
2017-03-09 12:52:03 +00:00
Andreas Bihlmaier
be90fbd1a1 Merged in andreasBihlmaier/nuttx/fixes-lpc43_gpdma (pull request #248)
rename LPC43_GPDMA_GLOBAL_CONFIG (already slipped previous commit C file); fix GPDMA_CONTROL_SBSIZE_*, improve usability of GPDMA_CONTROL_{S,D} macros

Approved-by: Gregory Nutt
2017-03-09 12:51:20 +00:00
Andreas Bihlmaier
9227947543 Merged in andreasBihlmaier/nuttx/fixes-lpc4310203050_pinconfig (pull request #247)
add missing PINCONF_INBUFFER in several places of lpc4310203050_pinconfig.h

Approved-by: Gregory Nutt
2017-03-09 12:50:45 +00:00
Andreas Bihlmaier
9ba4ce0bb9 Merged in andreasBihlmaier/nuttx/change-adc0_mask (pull request #246)
change Kconfig type of ADC0_MASK from hex to int; add ADC driver options to lpc43xx

Approved-by: Gregory Nutt
2017-03-09 12:49:58 +00:00
Andreas Bihlmaier
d32654afe3 Merged in andreasBihlmaier/nuttx/add-lpc4337fet256 (pull request #245)
add LPC4337FET256

Approved-by: Gregory Nutt
2017-03-09 12:47:53 +00:00
ahb
e1da80af5b fix as5048b by adding missing frequency parameter 2017-03-09 12:01:01 +01:00
ahb
164546a65c increase number of supported PWM channels from 4 to 6 2017-03-09 11:54:37 +01:00
ahb
7835e5bde8 actually write modified value to register 2017-03-09 11:33:09 +01:00