{"action":"created","issue":{"url":"https://api.github.com/repos/espressif/esp-idf/issues/1721","repository_url":"https://api.github.com/repos/espressif/esp-idf","labels_url":"https://api.github.com/repos/espressif/esp-idf/issues/1721/labels{/name}","comments_url":"https://api.github.com/repos/espressif/esp-idf/issues/1721/comments","events_url":"https://api.github.com/repos/espressif/esp-idf/issues/1721/events","html_url":"https://github.com/espressif/esp-idf/issues/1721","id":305051199,"number":1721,"title":"SPI problem with spi_device_transmit()","user":{"login":"seopyoon","id":8359372,"avatar_url":"https://avatars0.githubusercontent.com/u/8359372?v=4","gravatar_id":"","url":"https://api.github.com/users/seopyoon","html_url":"https://github.com/seopyoon","followers_url":"https://api.github.com/users/seopyoon/followers","following_url":"https://api.github.com/users/seopyoon/following{/other_user}","gists_url":"https://api.github.com/users/seopyoon/gists{/gist_id}","starred_url":"https://api.github.com/users/seopyoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seopyoon/subscriptions","organizations_url":"https://api.github.com/users/seopyoon/orgs","repos_url":"https://api.github.com/users/seopyoon/repos","events_url":"https://api.github.com/users/seopyoon/events{/privacy}","received_events_url":"https://api.github.com/users/seopyoon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-14T07:37:37Z","updated_at":"2018-03-16T04:16:58Z","closed_at":null,"author_association":"NONE","body":"For communicating with an NFC reader peripheral, I am using SPI protocol.  In the code, I only use synchronous communication with the SPI device (i.e. I only call spi_device_transmit() function).\r\n\r\nOnce in a while, I would get the following error.\r\n```\r\nassertion \"ret_trans==trans_desc\" failed: file \"/Users/seopyoon/Developer/esp-sdk/esp-idf/components/driver/./spi_master.c\", line 783, function: spi_device_transmit\r\n```\r\nWhat does it mean to have ret_trans and trans_desc to be the same?  "},"comment":{"url":"https://api.github.com/repos/espressif/esp-idf/issues/comments/373598836","html_url":"https://github.com/espressif/esp-idf/issues/1721#issuecomment-373598836","issue_url":"https://api.github.com/repos/espressif/esp-idf/issues/1721","id":373598836,"user":{"login":"Spritetm","id":8977247,"avatar_url":"https://avatars3.githubusercontent.com/u/8977247?v=4","gravatar_id":"","url":"https://api.github.com/users/Spritetm","html_url":"https://github.com/Spritetm","followers_url":"https://api.github.com/users/Spritetm/followers","following_url":"https://api.github.com/users/Spritetm/following{/other_user}","gists_url":"https://api.github.com/users/Spritetm/gists{/gist_id}","starred_url":"https://api.github.com/users/Spritetm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spritetm/subscriptions","organizations_url":"https://api.github.com/users/Spritetm/orgs","repos_url":"https://api.github.com/users/Spritetm/repos","events_url":"https://api.github.com/users/Spritetm/events{/privacy}","received_events_url":"https://api.github.com/users/Spritetm/received_events","type":"User","site_admin":false},"created_at":"2018-03-16T04:16:58Z","updated_at":"2018-03-16T04:16:58Z","author_association":"MEMBER","body":"spi_device_transmit should always get a device back, or wait for the message to come back; that's what the portMAX_DELAY is for. My guess is that either you're using spi_device_queue_trans somewhere in your code without getting the result using spi_device_get_trans_result, or calling spi_device_transmit on the same SPI device from multiple threads at the same time; both would lead to this assert triggering."}}
{"actor":{"display_login":"Spritetm"}}